Using one Sanity Studio for domain and subdomain with different documents
You can absolutely use one Sanity Studio with specific documents for your primary domain and different documents for a subdomain without needing an enterprise plan. You have a couple of approaches:
Option 1: Single Dataset with Filtering (Simplest)
Keep all your content in one dataset and filter documents based on which site they belong to. Add a field to your documents (like site: 'main' | 'subdomain') and then:
- In your Studio, use conditional desk structures to show only relevant documents
- In your frontend, query only the documents for that specific domain using GROQ filters
This works on any Sanity plan and is the most straightforward approach for most use cases.
Option 2: Multiple Datasets with Workspaces (Also Free)
You can create multiple datasets within the same project and use workspaces to manage them in one Studio. Each workspace connects to a different dataset:
// sanity.config.ts
export default defineConfig([
{
name: 'main-site',
title: 'Main Site',
projectId: 'your-project',
dataset: 'production',
// ... schema and plugins
},
{
name: 'subdomain',
title: 'Subdomain',
projectId: 'your-project',
dataset: 'subdomain',
// ... different schema if needed
}
])This gives you a workspace switcher in your Studio to toggle between datasets. This feature is available on all plans, including the free tier - you're not limited in the number of datasets per project.
Your primary domain would query from the production dataset, while your subdomain queries from the subdomain dataset. Each dataset can have its own schema, though you define all schemas in your Studio config.
When You'd Need Enterprise Features
The enterprise-only feature is cross-dataset references - if documents in one dataset need to directly reference documents in another dataset. For most multi-site setups where content is independent between domains, you won't need this.
The workspaces approach is particularly powerful for multi-site scenarios and is commonly used for exactly your use case - managing multiple domains or brands from a single Studio while keeping content separated.
Show original thread3 replies
Sanity – Build the way you think, not the way your CMS thinks
Sanity is the developer-first content operating system that gives you complete control. Schema-as-code, GROQ queries, and real-time APIs mean no more workarounds or waiting for deployments. Free to start, scale as you grow.