Does Sanity support multisites?
Yes. Sanity is API-based, so any number of websites and apps can read from the same project and dataset. To serve several sites you choose how to split the content (one dataset, or one per site) and how editors switch between sites (one Studio with several workspaces).
Option 1: Several front ends, one dataset
Each site uses its own client pointing at the same project. You keep site-specific content apart in your content model, for example a field or reference saying which site a document belongs to, and filter on it in your GROQ queries.
import {createClient} from '@sanity/client'
export const client = createClient({
projectId: 'YOUR_PROJECT_ID',
dataset: 'production',
useCdn: true,
apiVersion: '2026-03-01',
})This is the simplest setup. References and queries work across all the content, because everything is in one dataset.
Option 2: One dataset per site
A dataset works like a separate database. Queries can join documents inside a dataset but not across datasets. You can create one with sanity dataset create <name> or in Manage. Point each front end's dataset option at its site's dataset.
Plan limits, from the pricing page:
- Free: 2 datasets, public only
- Growth: 2 datasets (private or public). Extra datasets are an add-on at $999 per dataset per month.
- Enterprise: custom number of datasets
Editing several sites in one Studio: workspaces
Pass an array to defineConfig to get one workspace per site. Each workspace can have its own dataset, basePath, schema and plugins. The Studio shows a dropdown next to its title for switching between them, and it's still one codebase and one deployment.
// sanity.config.ts
import {defineConfig} from 'sanity'
import {structureTool} from 'sanity/structure'
import {schemaTypes} from './schemas'
export default defineConfig([
{
name: 'site-us',
title: 'USA',
basePath: '/us',
projectId: 'YOUR_PROJECT_ID',
dataset: 'hotels_us_production',
plugins: [structureTool()],
schema: {types: schemaTypes},
},
{
name: 'site-no',
title: 'Norway',
basePath: '/no',
projectId: 'YOUR_PROJECT_ID',
dataset: 'hotels_no_production',
plugins: [structureTool()],
schema: {types: schemaTypes},
},
])schema.types can also be a function that receives context.dataset, so you can load different types per site.
Workspaces don't control access. The workspace hidden option only hides a workspace in the Studio UI and "does not restrict data access". To limit what each team can see or edit, use roles. The multi-tenancy guide says private datasets need Growth or Enterprise, and custom roles and custom content resources need Enterprise.
For full separation of members and settings you can also use separate projects. The guide notes the trade-off: you can't reference content across projects, and any shared settings have to be copied by hand.
Sharing content between datasets (Enterprise)
Cross-dataset references let documents in one dataset reference documents in another dataset in the same project, such as a shared product catalog or legal copy. They need an Enterprise plan with the feature enabled, and API version v2022-03-07 or later. You can only dereference them with GROQ's -> operator; GraphQL isn't supported.
The multi-tenancy guide walks through a full setup: per-market and per-environment datasets, workspaces, schemas per dataset, conditional fields and scoped roles.
Show original thread2 replies
Was this answer helpful?
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.