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

Mint.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 check out the Project Configuration: Rewrites

Reach out to Mintlify team

Once completing the Vercel setup, the Mintlify team will setup the subdirectory settings in your deployment. Reach out over email.

Was this page helpful?