Prerequisite: Your primary domain (company.com) is hosted on and you are on the Mintlify Pro plan or above.

vercel.json Configuration

To host your documentation at a custom subpath using Vercel, you need to add the following configuration to your vercel.json file.

{
  "rewrites": [
    {
      "source": "/docs",
      "destination": "https://[subdomain].mintlify.dev/docs"
    },
    {
      "source": "/docs/:match*",
      "destination": "https://[subdomain].mintlify.dev/docs/:match*"
    }
  ]
}

For more information, you can also refer to Vercel’s offical guide on rewrites: Project Configuration: Rewrites

Was this page helpful?