CDN for Sanity
Sanity for content. Cloud CDN for delivery.
Sanity Studio is not the public bottleneck — the front end, images and SSR or static pages are. Those still need a global cache you can purge from GROQ-driven publishes.
Cache the Sanity-powered front end and images at Cloud CDN. Bypass Studio and preview. Purge when documents are published.
Why teams use Aptranet
What CDN for Sanity looks like on this network.
Cloud CDN caches and accelerates eligible content on 210+ points of presence, with Origin Shield when the origin must stay out of the way.
Pages at 210+ PoPs
The public site is served with 30 ms average latency regardless of where Sanity is queried.
Images adapted at the edge
Use one Sanity asset and create layout-specific variants at delivery time.
Studio stays off the CDN cache
Editors work on Sanity. Readers hit Cloud CDN.
How to set it up
A cutover you can validate before DNS moves.
Create the Cloud CDN configuration, prove it on an Aptranet hostname, then point production DNS when the path looks correct.
- 1Connect the front-end origin
Pull the Next.js, Remix or static site that reads Sanity.
- 2Cache public routes
Bypass preview and draft mode. Cache published HTML and assets.
- 3Purge from webhooks
Map published document types to URLs and purge them.
- 4Attach the site domain
Enable TLS and cut over DNS.
Outcomes
What changes once the hostname is on Aptranet.
- Sanity-powered sites are cached globally
- Studio and preview bypass cache
- Images can be transformed per template
- Publish webhooks can purge immediately
Keep reading
Related pages
More CDN use cases on the same Cloud CDN footprint.
Frequently Asked Questions
Prefer caching the front end. If you cache GROQ, exclude draft datasets and authenticated queries.
You can use Sanity as the image origin and still cache the result on Cloud CDN under your hostname.
Live preview must bypass cache. Only the public published hostname should be cached.
Yes. Protect non-public paths with Cloud CDN token authentication in addition to origin checks.
