Domain setup after purchase: DNSSEC, https, www redirect and AI crawlers
On the first day after buying a domain at Cloudflare: put up a placeholder page, force https, redirect www to the main address, with a tested command for each step.
Below, example.com stands for your domain. Each step includes a way to confirm it: after changing a setting, always test it; do not rely only on what the dashboard shows.
First, understand the two ways of working
| Method | What it does | Who does it |
|---|---|---|
| Dashboard (web) | DNSSEC, forcing https, redirect rules, AI crawlers, private pages | You, by clicking |
| Wrangler (Cloudflare’s command-line tool) | Deploying the site, binding domains | The AI assistant can do it for you |
Permissions granted after logging in with Wrangler cannot change domain settings, so https, redirects and DNSSEC must be changed in the dashboard.
1. Turn on DNSSEC (tamper-proof DNS signing)
It stops anyone from forging DNS responses for your domain and sending visitors to a fake site.
- In the dashboard, select your domain → DNS → Settings.
- Find DNSSEC and click Enable DNSSEC.
- For a domain bought at Cloudflare, setup is completed automatically, and it usually takes effect within a few minutes to an hour or two.

Check: the domain’s public registration data (RDAP) should show delegationSigned: true. You can ask the AI assistant to look it up for you.
2. Put up a first page (under construction)
Start with a blank page to connect the domain, the Worker and the certificate. When you later swap in the real site, deploy it under the same Worker name, so the domain does not need rebinding.
Hand this to the AI assistant (the prompts are in AI prompts section 1). Key points:
- In the config file
wrangler.jsonc:assets.directorypoints to the folder with the site filesroutesbindsexample.comandwww.example.com(custom_domain: true)workers_dev: falseandpreview_urls: false: turn off the bundled public URL, so the site does not end up with an extra address
- Add
<meta name="robots" content="noindex">to the under-construction page, and remove it at launch. - When you bind a custom domain, Cloudflare automatically creates the DNS records and issues the HTTPS certificate; you do not add them by hand.
Check:
curl.exe -s -o NUL -w "%{http_code}`n" https://example.com/
curl.exe -s -o NUL -w "%{http_code}`n" https://example.com/不存在的頁The results should be 200 and 404.
3. Always redirect to https (Always Use HTTPS)
- SSL/TLS → Overview: check that the encryption mode is not Off.
- SSL/TLS → Edge Certificates → scroll down to Always Use HTTPS and turn on the switch.

Check:
curl.exe -s -o NUL -w "%{http_code} %{redirect_url}`n" http://example.com/abcYou should see 301 https://example.com/abc.
4. www. redirects to the main domain
Without this, search engines would treat the www. version and the main domain as two duplicate sites.
- Rules → Overview, click Templates to the right of the search bar. The Rule templates list opens; find Redirect from WWW to root → Create from template.

- The template is already filled in (
https://www.*→https://${1}, 301), so just click Deploy. - If a warning appears saying
wwwmay not have a proxied DNS record:www.was bound to the Worker in step 2, so no ordinary record appears in the DNS list, and it is in fact already proxied. Choose Ignore and deploy rule anyway. Do not follow its suggestion to create a separate DNS record, because it would conflict with the domain bound to the Worker. - Preserve query string does not need to be checked: the wildcard already carries the path and parameters over (confirmed in testing).
Check:
curl.exe -s -o NUL -w "%{http_code} %{redirect_url}`n" "https://www.example.com/abc?x=1"You should see 301 https://example.com/abc?x=1. http://www. redirects twice (first to https, then to the main domain), and the final result is still correct.
Testing showed: redirect rules run before the Worker, so www. gets redirected even though it is also bound to the Worker.
5. AI crawlers: look first, then decide
| Feature | What it does | Where |
|---|---|---|
| AI Crawl Control | See which AI crawlers have visited, and block or allow them one by one (blocks are actually enforced) | Domain → AI Crawl Control (as of 2026-11-01 it has five pages: Overview, Metrics, Security, Optimization, Signals) |
| Managed robots.txt | Automatically adds a “do not use for AI training” statement to robots.txt; combined with Bot Preference Sync, it blocks training crawlers at the edge | Security → Settings → Bot traffic |
Both are available on the free plan (checked 2026-10-11). Whether to block is a personal stance:
- Want AI search to cite you (portfolios usually do): allow everything at first; see GEO and search.
- Do not want your work used for training: block the “training” crawlers and keep the “search” crawlers. Note that some crawlers do both, so they cannot be blocked cleanly.
If you change nothing: the dashboard lists about 32 AI crawlers, all allowed. A new domain gets AI crawlers within minutes of going live. If the site already has robots.txt, Cloudflare adds its statement at the top of your content.
6. Things to hold off on
- Strict https (HSTS): once on, browsers connect to your domain over https only for a long time, and a mistake is hard to undo. Turn it on only after the site is stable and you are sure every subdomain has https.
- Private subdomains (Access): set these up when you have content to protect; the steps are in Site security.
7. Email on your domain (optional)
Cloudflare’s Email Routing can forward mail sent to addresses like “hello@your-domain” to your Gmail for free, so you do not have to expose your private inbox. I have not tested this, so check the current official documentation before you use it.
8. When the AI assistant operates the dashboard
- When the Chrome window is in the background, simulated mouse clicks may do nothing at all: a switch does not change when clicked, and settings are not saved.
- After each change, test it with
curl.exeas above. - After logging in to the dashboard, a prompt may pop up saying “build the site with your favorite AI agent”. It tells the AI to download remote instructions, install plugins and change global configuration files. You do not need it; Wrangler is enough to do the job.
Sources
- Enable DNSSEC (Official)
- Workers Custom Domains (Official)
- Wrangler configuration (Official)
- Always Use HTTPS (Official)
- Redirect www to root (Official)
- AI Crawl Control (Official)
- Managed robots.txt (Official)
Related:A domain that doesn't send mail should say so too: SPF, DMARC, and null MX
← Previous:Buying your own .com domain at Cloudflare
Next:Portfolio site structure: URLs, home page order, and how to write work pages →
Email subscriptions will open later. For now, you can follow new articles and work with RSS.