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
+21-14Lines changed: 21 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,18 +24,6 @@ Create a Cloudflare Worker by following the [Cloudflare Workers getting started
24
24
If your DNS provider is Cloudflare, do not use proxying for the CNAME record.
25
25
</Warning>
26
26
27
-
### Add custom domain
28
-
29
-
1. In your [Cloudflare dashboard](https://dash.cloudflare.com/), navigate to your Worker.
30
-
2. Go to **Settings > Domains & Routes > Add > Custom Domain**.
31
-
3. Add your domain.
32
-
33
-
<Tip>
34
-
We recommend you add your domain both with and without `www.` prepended.
35
-
</Tip>
36
-
37
-
See [Add a custom domain](https://developers.cloudflare.com/workers/configuration/routing/custom-domains/#add-a-custom-domain) in the Cloudflare documentation for more information.
38
-
39
27
### Configure routing
40
28
41
29
In your Cloudflare dashboard, select **Edit Code** and add the following script into your Worker's code. See the [Cloudflare documentation](https://developers.cloudflare.com/workers-ai/get-started/dashboard/#development) for more information on editing a Worker.
@@ -80,9 +68,28 @@ async function handleRequest(request) {
80
68
Select `Deploy` and wait for the changes to propagate (it can take up to a few
81
69
hours).
82
70
83
-
## Resolving DNS conflicts
71
+
### Test your Worker
72
+
73
+
After your code deploys, test your Worker to ensure it routes to your Mintlify docs.
74
+
75
+
1. Test using the Worker's preview URL: `your-worker.your-subdomain.workers.dev/docs`
76
+
2. Verify the Worker routes to your Mintlify docs and your website.
84
77
85
-
If your domain already points to another service, you will see an error about an existing DNS record. Your Cloudflare Worker must be configured to control all traffic for your domain.
78
+
### Resolve DNS conflicts
79
+
80
+
If your domain already points to another service, you must remove the existing DNS record. Your Cloudflare Worker must be configured to control all traffic for your domain.
86
81
87
82
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.
88
83
2. Return to your Worker and add your custom domain.
84
+
85
+
### Add custom domain
86
+
87
+
1. In your [Cloudflare dashboard](https://dash.cloudflare.com/), navigate to your Worker.
88
+
2. Go to **Settings > Domains & Routes > Add > Custom Domain**.
89
+
3. Add your domain.
90
+
91
+
<Tip>
92
+
We recommend you add your domain both with and without `www.` prepended.
93
+
</Tip>
94
+
95
+
See [Add a custom domain](https://developers.cloudflare.com/workers/configuration/routing/custom-domains/#add-a-custom-domain) in the Cloudflare documentation for more information.
0 commit comments