Discussion about using Sanity as a multi-site CMS and the different approaches to achieve it.

9 replies
Last updated: Jun 3, 2022
Has anybody used the experimental spaces feature to setup Sanity as a multi site CMS? I’m thinking about the best way to setup Sanity to handle 5+ different websites
AI Update

I've definitely seen workspaces used successfully for multi-site setups! The good news is that workspaces are a stable feature in Sanity Studio v3+ (not experimental anymore), and they're a great fit for managing 5+ websites.

How Workspaces Work for Multi-Site

Workspaces let you configure multiple isolated Studio environments within a single Sanity project. Each workspace can have its own:

  • Dataset - Separate content for each site
  • Schema configuration - Different content models per site
  • Tools and plugins - Custom functionality per workspace
  • UI customization - Tailored interface for each site's needs

You configure them in your sanity.config.js using defineConfig:

import { defineConfig } from 'sanity'
import { deskTool } from 'sanity/desk'

export default defineConfig([
  {
    name: 'site-1',
    title: 'Site 1',
    projectId: 'your-project-id',
    dataset: 'site1-production',
    plugins: [deskTool()],
    schema: { types: [/* site 1 schemas */] }
  },
  {
    name: 'site-2',
    title: 'Site 2',
    projectId: 'your-project-id',
    dataset: 'site2-production',
    plugins: [deskTool()],
    schema: { types: [/* site 2 schemas */] }
  }
  // ... add more workspaces for each site
])

Your editors get a dropdown in the Studio to switch between sites - it's a single codebase serving multiple purposes.

Key Considerations

Schema management: Even though datasets are separate, all possible schemas need to be defined in your config. You might want to use conditional desk structures to show only relevant schemas per workspace.

Shared vs separate content: If your sites need to share some content (like a global asset library), you'll want to look into cross-dataset references (Enterprise feature) or use a shared dataset approach.

Pricing: Each dataset counts toward your plan limits, so with 5+ sites you'll have 5+ datasets. Check the pricing page for dataset limits on your plan tier - in 2025, this is an important consideration for multi-site setups.

Access control: You can set different permissions per workspace, which is perfect if different teams manage different sites.

Why Sanity Works Well for This

Sanity's architecture is particularly good for multi-site because:

  • The Content Lake supports multiple datasets natively
  • Workspaces share infrastructure (cost-efficient) while maintaining separation
  • You can reuse schema components across sites while customizing per-site
  • The API is consistent across all datasets, making frontend implementation cleaner

The multi-tenancy guide has some great patterns if you're managing sites for different clients or brands. It's worth a read for advanced permission and isolation strategies.

If the schema is the same, it'll be super easy to pull off. You'll just need to switch datasets.
It gets a bit trickier if you need different schema for each site. You'd need to include all of the possible schema in your
schema.js
file, then
It's totally possible. You have a few different options for your approach.
I have a Studio that I use for support that technically has 4 different Studios mashed together in it. They're all in the same dataset and I use a custom structure to handle their separation (see attached screenshot).

If you want more separation, you can have your structure check which dataset is selected and return a completely different structure for each one. You'd still need to add all of the possible schema options to your
schema.js
though.
We use Sanity for a "multisite" with 3 spites within the same dataset. How we solve it is having a "site" document and documents referencing this site. We make the UX better by having custom desk structure and initial value templates to hide this reference mostly from the user.
A big bonus from this is that we can easily share content across the different sites, as some document types are nice to share, and you also share the same media.
user M
Hi! I am looking at setting up a multisite also, and came across Spaces.
It looks great, but I would consider doing it the way you’ve shown, all within 1 dataset.

The only issue is that we need to sync multiple Shopify accounts to Sanity, a different one for each storefront, due to being for different countries of the same company.

Would this be possible within 1 dataset, or would it make more sense to use Spaces?
Hey
user N
! Sorry this got missed. It's really difficult to track tickets when they get opened in old threads that have already been resolved. If you open up a new thread next time, you're more likely to get faster follow up 🙂
I'd say yes, this method with a single dataset could very likely work for you. I don't have a ton of experience syncing from Shopify, but since you can specify custom sync scripts using data from different shops shouldn't be an issue.
Hi RD, noted! Thanks for the reply regardless.We have been in touch with sales support and are working through this with them, so a solution is on the way! Will post about the project once we do get it completed as would be an interesting case study
Sales reached out to me for help with your email, which triggered a memory of this showing up in my threads one morning 😅. Our ticket tracking system doesn't do so well with tickets in threads, so unfortunately it was up to my fickle memory here.
Feel free to drop a thread in the help channel as you work through your build if you need more specific help.
Ahh ok great, yes I will do, I’m sure there will be some back and forth on this process.

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.

Was this answer helpful?