Mintlify serves each project from a single primary custom domain. To route additional hostnames to the same documentation, or to combine multiple projects under one domain, see Limitations and lifecycle.
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:
The
/.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:
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.