Hosting Sanity Studio

On Sanity

  1. Go to https://www.sanity.io/manage/
  1. Navigate to the project
  1. Go to Settings > General settings
  1. Find Custom studio URL
  1. Add the desired URL i.e. https://myrealdomain.com/studio

In the code

  1. Create a vercel.json file in the root of the project
  1. Add the following:
    1. {
        "trailingSlash": false,
        "rewrites": [
          { "source": "/studio/(.*)", "destination": "/studio/index.html" }
        ]
      }