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 Cloudflare Worker by going to
Workers & Pages > Create application > Create worker
-
Add your custom domain:
- Go to
Configure worker > Settings > Triggers
- Click
Add Custom Domain
- Add your domain (both with and without
www.
)
- Go to
-
Add the Worker Script:
- Click
Edit Code
- Copy the script below
- Replace
[SUBDOMAIN]
with your Mintlify subdomain - Replace
[YOUR_DOMAIN]
with your website’s domain
- Click
- Click
Deploy
and wait for changes to propagate (may take a few hours)
Need help? Contact our support team for assistance with custom subdirectory setup.
Was this page helpful?