
Grab your gear: The official Sanity swag store
Read Grab your gear: The official Sanity swag storeUnfortunately, custom CDN domains (using your own domain instead of cdn.sanity.io for image URLs) are only available on Enterprise plans. This is mentioned in the community discussion about custom CDN domains.
However, there's a solid workaround that several people in the community use successfully - you can set up a reverse proxy/redirect on your own domain:
The redirect approach:
const fileName = url.substring(url.lastIndexOf('/') + 1)https://your-domain.com/files/${fileName}/files/* to https://cdn.sanity.io/files/[your-project-id]/[your-dataset-name]/:splatIf you're using Netlify, this is particularly straightforward with their redirect rules. Many folks have implemented this successfully.
For images specifically, you can also use the baseUrl option in @sanity/image-url to customize the base URL for your image transformations, though you'd still need the proxy/redirect setup to make it work.
This approach gives you branded URLs for SEO purposes while still leveraging Sanity's global CDN infrastructure for actual delivery. The redirect happens at the DNS/server level, so it's fast and transparent to end users.
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