Choose your deployment approach
Mintlify supports two reverse proxy configurations depending on your subpath requirements.- Host at
/docs: Enable the Host at/docstoggle on the Custom domain setup page in your dashboard. This is a simpler configuration with fewer routes. - Custom subpath: Use any subpath you choose. This approach requires additional routing rules.
mintlify.site 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
/docstoggle. - Enter your domain and click Add domain.
Routing configuration
Proxy these paths to your Mintlify subdomain:| Path | Destination | Caching |
|---|---|---|
/docs | <your-subdomain>.mintlify.site/docs | No cache |
/docs/* | <your-subdomain>.mintlify.site/docs | No cache |
/.well-known/vercel/* | <your-subdomain>.mintlify.site | No cache |
/.well-known/skills/* (optional) | <your-subdomain>.mintlify.site/docs | No cache |
/.well-known/agent-skills/* (optional) | <your-subdomain>.mintlify.site/docs | No cache |
/skill.md (optional) | <your-subdomain>.mintlify.site/docs | No cache |
/llms.txt (optional) | <your-subdomain>.mintlify.site/docs | No cache |
/llms-full.txt (optional) | <your-subdomain>.mintlify.site/docs | No cache |
/.well-known/skills/*, /.well-known/agent-skills/*, /skill.md, /llms.txt, and /llms-full.txt routes are optional. Include them only if you want to serve AI files at root paths like your-domain.com/llms.txt instead of under your docs subpath like your-domain.com/docs/llms.txt.
Required header configuration
Configure your reverse proxy with these header requirements:- Origin: Contains the target subdomain
<your-subdomain>.mintlify.site - X-Forwarded-For: Preserves client IP information
- X-Forwarded-Proto: Preserves original protocol (HTTP/HTTPS)
- X-Real-IP: Forwards the real client IP address
- User-Agent: Forwards the user agent
Example nginx configuration
Custom subpath
Reverse proxy configurations for custom subpaths are only supported for Enterprise plans.
/docs (such as /help or /resources), use the following routing configuration.
Proxy these paths to your Mintlify subdomain with the specified caching policies:
| Path | Destination | Caching |
|---|---|---|
/.well-known/vercel/* | <your-subdomain>.mintlify.site | No cache |
/.well-known/skills/* | <your-subdomain>.mintlify.site | No cache |
/.well-known/agent-skills/* | <your-subdomain>.mintlify.site | No cache |
/skill.md | <your-subdomain>.mintlify.site | No cache |
/llms.txt | <your-subdomain>.mintlify.site | No cache |
/llms-full.txt | <your-subdomain>.mintlify.site | No cache |
/mintlify-assets/_next/static/* | <your-subdomain>.mintlify.site | Cache enabled |
/_mintlify/* | <your-subdomain>.mintlify.site | No cache |
/* | <your-subdomain>.mintlify.site | No cache |
/ | <your-subdomain>.mintlify.site | No cache |
Mintlify serves
llms.txt, llms-full.txt, and skill.md at the root path. If your docs live under a subpath (such as /help), you can also serve these files under that subpath (for example, /help/llms.txt). To do this, add location blocks that rewrite the subpath to the root path. See the nginx example below for both patterns.Required header configuration
Configure your reverse proxy with these header requirements:- Origin: Contains the target subdomain
<your-subdomain>.mintlify.site - X-Forwarded-For: Preserves client IP information
- X-Forwarded-Proto: Preserves original protocol (HTTP/HTTPS)
- X-Real-IP: Forwards the real client IP address
- User-Agent: Forwards the user agent
Example nginx configuration
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>.mintlify.site.
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>.mintlify.site)
Performance issues
Symptoms: Slow page loads and layout shifts. Cause: Incorrect caching configuration. Solution: For custom subpath configurations, enable caching only for/mintlify-assets/_next/static/* paths. The /docs subpath configuration handles caching automatically.