✦Always verify on *.pages.dev BEFORE touching your custom domain
01Read the section
02Apply to your project
03Review the result
Illustration · not connected to your accounts
Step 2 of 4
Attach your custom domain safely
In your Cloudflare Pages project, open Custom domains → Set up a custom domain and enter yourdomain.com. If your domain DNS is hosted in Cloudflare, Cloudflare configures the CNAME/apex record and provisions free HTTPS automatically.
Always verify on *.pages.dev BEFORE touching your custom domain
Connect your GitHub repo in Cloudflare Workers & Pages (Framework preset: Astro, Build command: npm run build, Build output: dist, NODE_VERSION: 22.23.4). Cloudflare publishes a free staging address like your-site.pages.dev.
Test every page, mobile menu, link, 404 page, and form on the staging URL first. Only switch DNS once staging is 100% verified.
Attach your custom domain safely
In your Cloudflare Pages project, open Custom domains → Set up a custom domain and enter yourdomain.com. If your domain DNS is hosted in Cloudflare, Cloudflare configures the CNAME/apex record and provisions free HTTPS automatically.
Then add www.yourdomain.com and set up a 301 Redirect Rule in Cloudflare so www and apex resolve to one canonical domain. Double-check that your existing MX and TXT email records remain untouched.
Contact forms & analytics without a WordPress database
Static sites handle contact forms reliably without exposing a vulnerable database. Choose whichever option fits your comfort level:
No-code form endpoints: Formspree, Basin, or Tally — paste their form action URL into your static HTML <form>.
Cloudflare-native form handler: A tiny Cloudflare Pages Function or Worker paired with Cloudflare Turnstile (free privacy-first bot protection) sending mail via Resend, Postmark, or Cloudflare Email Routing.
Analytics: Cloudflare Web Analytics (free, cookie-free, zero GDPR banner bloat) + Google Search Console for indexing and search query reports.
INTERACTIVE DNS & EMAIL SAFETY SIMULATOR
Preview Your Exact Safe Cloudflare DNS Records
Enter your domain and email provider to see which records point to your new static site — and which records you must keep untouched so company email never drops.
Action
Type
Name
Target / Value
Pre-cutover DNS backup & verification commands
MODULE 07 VERIFICATION
Before moving on
Staging *.pages.dev URL verified across desktop and mobile before DNS switch.
Custom apex domain live with HTTPS padlock and valid SSL certificate.
www.yourdomain.com cleanly 301-redirects to your canonical domain.
Business email tested (send and receive) immediately after DNS switch.
Contact form tested end-to-end with spam protection enabled.