Set your base path
Set your base path on the Custom domain setup page in your dashboard. Then configure your reverse proxy to route that path to Mintlify. The default base path is/docs, but you can use any base path you choose, like /help or /resources.
The directory that contains your documentation in your repository does not configure the public base path. For example, storing documentation under a /docs directory does not replace setting /docs as the base path in your dashboard.
In all configurations, use mintlifysite.com as the proxy target.
Host at /docs subpath
Use this configuration when you want to serve documentation at the /docs path on your domain.
Before configuring your reverse proxy:
- Navigate to Custom domain setup in your dashboard.
- Enable the Host at toggle.
- Enter your domain.
- Enter
docsas your base path. - Click Add domain.
Routing configuration
Proxy these paths to your Mintlify subdomain:
Your proxy must forward all HTTP methods on documentation paths. Mintlify sends analytics events as
POST requests to /docs/_mintlify/api/v1/e. A proxy that only allows GET and HEAD requests silently breaks the analytics in your dashboard.
Mintlify serves these files under your base path, like <your-subdomain>.mintlifysite.com/docs/llms.txt. They are available on your domain under your subpath, like your-domain.com/docs/llms.txt, through your main subpath route.
The /docs/* route also covers generated llms.txt indexes under /docs/_llms/*. If your proxy uses a more granular path allowlist instead of forwarding all /docs/* requests, include /docs/_llms/* so agents can follow every index linked from /docs/llms.txt.
Do not rewrite only /docs/llms.txt to a root-hosted /llms.txt. Set /docs as the deployment base path and forward the full /docs/* route. This keeps page links and generated /docs/_llms/* index links on the same public prefix.
The /.well-known/skills/*, /.well-known/agent-skills/*, /skill.md, /llms.txt, and /llms-full.txt routes are optional. Include them only if you also want to serve these files at root paths on your domain, like your-domain.com/llms.txt. Each root path maps to the file under your base path on your Mintlify subdomain.
Required header configuration
Configure your reverse proxy with these header requirements:- Origin: Contains the target subdomain
<your-subdomain>.mintlifysite.com. - X-Forwarded-For: Preserves client IP information.
- X-Forwarded-Proto: Preserves the original protocol (HTTP/HTTPS).
- X-Real-IP: Forwards the real client IP address.
- User-Agent: Forwards the user agent.
Example nginx configuration
Custom subpath
To use a subpath other than/docs (such as /help or /resources):
- Navigate to the Custom domain setup page in your dashboard.
- Enable the Host at toggle.
- Enter your domain.
- Enter your base path. For example,
/docsor/help. - Click Add domain.
<your-subdomain>.mintlifysite.com<your-base-path> serves your content.
Configure your reverse proxy using the same routing configuration, header requirements, and nginx patterns as the /docs subpath, replacing /docs with your base path.
Troubleshooting
Changes not appearing
Symptoms: You publish documentation updates, but the changes don’t appear on your site. Cause: Your reverse proxy points to an outdated hostname. Solution: Update your reverse proxy configuration to point to<your-subdomain>.mintlifysite.com.
404 error
Symptoms: Documentation loads, but features don’t work. API calls fail. Cause: The reverse proxy forwards theHost header or the Origin header is missing.
Solution:
- Remove
Hostheader forwarding. - Set the
Originheader to your Mintlify subdomain (<your-subdomain>.mintlifysite.com).
Generated /_llms/ links return 404
Symptoms: Your llms.txt file loads, but links under /_llms/ return 404 or omit your public subpath.
Cause: The public subpath does not match the base path configured in Mintlify, or the proxy only forwards llms.txt and not its generated index routes.
Solution:
- Set the public subpath as the base path in your Mintlify dashboard. A repository directory with the same name does not configure it.
- Forward the full
<base-path>/*route, or add<base-path>/_llms/*to a granular allowlist. - Redeploy your documentation, then verify both
<base-path>/llms.txtand one linked<base-path>/_llms/*.mdURL.
Performance issues
Symptoms: Slow page loads and layout shifts. Cause: Incorrect caching configuration. Solution: Disable caching for documentation paths. If you proxy/mintlify-assets/_next/static/* paths, enable caching only for those static assets.