Skip to content

Commit e9c9c5f

Browse files
committed
reorder steps, add testing
1 parent 729d8f1 commit e9c9c5f

File tree

1 file changed

+21
-14
lines changed

1 file changed

+21
-14
lines changed

advanced/subpath/cloudflare.mdx

Lines changed: 21 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -24,18 +24,6 @@ Create a Cloudflare Worker by following the [Cloudflare Workers getting started
2424
If your DNS provider is Cloudflare, do not use proxying for the CNAME record.
2525
</Warning>
2626

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-
3927
### Configure routing
4028

4129
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) {
8068
Select `Deploy` and wait for the changes to propagate (it can take up to a few
8169
hours).
8270

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.
8477

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.
8681

8782
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.
8883
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

Comments
 (0)