
Grab your gear: The official Sanity swag store
Read Grab your gear: The official Sanity swag storeThe productionURL you're asking about is typically used in Sanity's preview/presentation features to help the Studio know where your production website is hosted. Let me break down the easiest way to set it up.
The simplest way to configure your production URL is in your sanity.config.ts when setting up the Presentation tool:
// sanity.config.ts
import {defineConfig} from 'sanity'
import {presentationTool} from 'sanity/presentation'
export default defineConfig({
// ... other config
plugins: [
presentationTool({
previewUrl: 'https://your-website.com', // Your production URL
// Or for local development:
// previewUrl: 'http://localhost:3000',
}),
],
})The previewUrl (sometimes called productionURL in guides) tells Sanity Studio:
For different environments:
presentationTool({
previewUrl: process.env.SANITY_STUDIO_PREVIEW_URL || 'http://localhost:3000',
})This way you can use environment variables to switch between local and production URLs.
If you're just getting started, simply point it to where your website runs:
http://localhost:3000 (or whatever port your dev server uses)https://mysite.comThe guides you might be reading could be showing more complex setups with document resolvers and location resolvers for advanced routing patterns, but you don't need those to get started. Just set the basic previewUrl and you should be good to go!
If you need more advanced features like automatically opening specific documents to their corresponding pages, that's where the Presentation Resolver API comes in, but start simple first.
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