
Grab your gear: The official Sanity swag store
Read Grab your gear: The official Sanity swag storeWhile there isn't an official Sanity guide specifically for Google App Engine deployment, I can help you piece together what you need. Sanity Studio is a React Single Page Application (SPA) that builds to static files, so deploying it to App Engine is definitely possible.
First, you'll need to build your Studio. Run sanity build (or npm run build) in your Studio directory, which creates a dist folder containing your static files.
Here's an example app.yaml for deploying Sanity Studio to Google App Engine standard environment:
runtime: nodejs20 # or nodejs22 if supported
service: default
handlers:
# Serve static files from the dist directory
- url: /static
static_dir: dist/static
secure: always
# Serve other static assets
- url: /(.*\.(js|css|png|jpg|jpeg|gif|svg|ico|woff|woff2|ttf|eot))$
static_files: dist/\1
upload: dist/.*\.(js|css|png|jpg|jpeg|gif|svg|ico|woff|woff2|ttf|eot)$
secure: always
# Catch-all handler for SPA routing - serve index.html
- url: /.*
static_files: dist/index.html
upload: dist/index.html
secure: alwaysThe key here is the catch-all handler at the end, which ensures that all routes serve index.html - this is essential for SPA routing to work correctly.
Important considerations:
CORS Configuration: After deploying, you'll need to add your App Engine URL to your Sanity project's CORS origins. Go to manage.sanity.io, select your project, navigate to API settings, and add your appspot.com URL.
Alternative: Use sanity deploy: The recommended approach is actually to use sanity deploy, which hosts your Studio on Sanity's infrastructure at your-hostname.sanity.studio. This includes automatic SSL, schema deployment for AI features, and no CORS configuration needed.
Build output: Make sure your dist folder exists before deploying. The build command generates this directory with all your Studio's compiled assets.
If you're set on App Engine for specific infrastructure reasons, the app.yaml above should work. Just make sure to test the deployment and verify that client-side routing works correctly by navigating to different Studio paths directly.
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