On Sanity
- Navigate to the project
- Go to Settings > General settings
- Find Custom studio URL
- Add the desired URL i.e.
https://myrealdomain.com/studio
In the code
- Create a
vercel.json
file in the root of the project
- Add the following:
{
"trailingSlash": false,
"rewrites": [
{ "source": "/studio/(.*)", "destination": "/studio/index.html" }
]
}