
Grab your gear: The official Sanity swag store
Read Grab your gear: The official Sanity swag storeGreat question! Deploying Sanity Studio to Netlify is definitely doable. Since the tutorial focuses on deploying your Gatsby site, I'll walk you through the Studio deployment part.
Sanity Studio is a React Single Page Application (SPA), so you can self-host it on Netlify. You'll need to build the Studio into static files and configure Netlify to handle SPA routing properly.
In your Netlify settings (or netlify.toml file), configure:
sanity builddistIf you're working with a monorepo where your Studio is in a subdirectory (like studio/), you'll need to:
studio (or wherever your Studio lives)distsanity buildHere's an example netlify.toml for a monorepo setup:
[build] base = "studio/" command = "sanity build" publish = "dist"
Since Sanity Studio is an SPA, you need to tell Netlify to redirect all routes to index.html. Create a _redirects file in your Studio's static folder (create the folder if it doesn't exist):
/* /index.html 200
This ensures that navigating directly to Studio routes (like /desk or /vision) works correctly instead of returning 404 errors.
This is crucial! After your Studio is deployed to Netlify, you need to add the Netlify URL to your Sanity project's CORS origins:
https://your-studio-name.netlify.app)Without this step, your Studio won't be able to authenticate and access your content.
sanity deployJust a heads up—while self-hosting on Netlify works great, Sanity also offers hosted Studio deployment with the sanity deploy command. This gives you a *.sanity.studio URL with automatic SSL, no CORS configuration needed, and it's the recommended approach since it automatically deploys your schema for features like AI Agent Actions.
You can run both! Many teams use sanity deploy for their production Studio while keeping Netlify for the Gatsby frontend.
@sanity/cli is in your package.json dependencieshttps://) is in CORS origins with "Allow credentials" enabled_redirects file is in the static folder and contains the SPA redirect ruleHope this helps you get your Studio deployed! Let me know if you run into any issues with these steps.
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.
Content operations
Content backend


The only platform powering content operations
By Industry


Tecovas strengthens their customer connections
Build and Share

Grab your gear: The official Sanity swag store
Read Grab your gear: The official Sanity swag store