
This template demonstrates how to serve Mintlify-hosted documentation from your main domain using Vercel's vercel.ts configuration. Instead of linking to docs.yourdomain.com or an external URL, your docs are seamlessly integrated at /docs on your product site.
The demo shows a fictional product site ("Flux") with docs hosted on Mintlify but served from the main domain for a unified user experience.
https://mintlify-docs-rewrite.vercel.app/
Visit the docs at /docs to see the Mintlify-hosted site served through the main domain.
You can choose from one of the following two methods to use this repository:
Deploy the example using Vercel:
Execute create-next-app with npm or Yarn to bootstrap the example:
pnpm create next-app --example https://github.com/vercel/examples/tree/main/cdn/mintlify-docs-rewrite
Next, run Next.js in development mode:
pnpm dev
MINTLIFY_DOCS_URL – Your Mintlify custom domain URL (e.g., https://your-subdomain.mintlify.dev)Set this in your Vercel project settings or in a .env.local file.
your-subdomain.mintlify.dev)vercel.ts exports a config with rewrite rules that map /docs and /docs/:match* to your Mintlify URLyourdomain.com/docs and see your Mintlify documentation as if it's part of your main site