Custom Subpaths
Cloudflare
Host documentation at a /docs subpath using Cloudflare Workers
Prerequisite: Your primary domain (company.com) is hosted on and you are on the Mintlify Pro plan or above.
Setup Steps
- Create a new Cloudflare Worker at
Workers & Pages > Create application > Create worker
- Add your custom domain by going to
Settings > Triggers > Add Custom Domain
- Add both
domain.com
andwww.domain.com
versions
- Add both
- Click
Edit Code
and paste the following script:
Replace [SUBDOMAIN]
and [YOUR_DOMAIN]
in DOCS_URL
and CUSTOM_URL
with your values
- Click
Deploy
(changes may take a few hours to propagate)
Need help? Contact our support team
Was this page helpful?