You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: advanced/subpath/cloudflare.mdx
+53Lines changed: 53 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -85,3 +85,56 @@ If your domain already points to another service, you must remove the existing D
85
85
86
86
1. Delete the existing DNS record for your domain. See [Delete DNS records](https://developers.cloudflare.com/dns/manage-dns-records/how-to/create-dns-records/#delete-dns-records) in the Cloudflare documentation for more information.
87
87
2. Return to your Worker and add your custom domain.
88
+
89
+
## Webflow custom routing
90
+
If you use Webflow to host your main site and want to serve Mintlify docs at `/docs` on the same domain, you'll need to configure custom routing through Cloudflare Workers to proxy all non-docs traffic to your main site.
91
+
92
+
<Warning>
93
+
Make sure your main site is set up on a landing page before deploying this Worker, or visitors to your main site will see errors.
94
+
</Warning>
95
+
96
+
1. In Webflow, set up a landing page for your main site like `landing.yoursite.com`. This will be the page that visitors see when they visit your site.
97
+
2. Deploy your main site to the landing page. This ensures that your main site remains accessible while you configure the Worker.
98
+
3. To avoid conflicts, update any absolute URLs in your main site to be relative.
99
+
4. In Cloudflare, select **Edit Code** and add the following script into your Worker's code.
100
+
101
+
<Tip> Replace `[SUBDOMAIN]` with your unique subdomain, `[YOUR_DOMAIN]` with your website's base URL, and `[LANDING_DOMAIN]` with your landing page URL. </Tip>
0 commit comments