How to Point Your Domain to Cloudflare Pages (Step by Step)
A custom domain makes a site look finished, and Cloudflare Pages serves it with free HTTPS automatically. The whole setup is three moves: put the domain on Cloudflare, attach it to your Pages project, and update your canonical URLs. Expect it to take about 15 minutes plus some waiting for DNS.
Before you start
You need a domain bought from any registrar (Cloudflare Registrar sells at cost to members; prices everywhere change, so check current pricing at your registrar). Then:
- Sign up for a free Cloudflare account
- Have the project ready — here that is a Pages project like
codecrumbs
Step 1: Add the domain to Cloudflare
In the Cloudflare dashboard: Add a domain → enter your domain → choose the Free plan. Cloudflare gives you two nameservers, for example something like alice.ns.cloudflare.com.
Step 2: Update nameservers at your registrar
Go to where you bought the domain, find the nameserver settings, and replace the defaults with the two Cloudflare ones. Save. Propagation usually takes minutes but can stretch to a day — you will see the domain turn "Active" in the Cloudflare dashboard when it is done.
Step 3: Attach it to Pages
Cloudflare dashboard → Workers & Pages → your project → Custom domains → Add a custom domain. Because the domain already lives on the same Cloudflare account, no extra DNS records are needed — it verifies itself. (If the domain were on a different account, Cloudflare would ask you to add a CNAME or TXT record instead.)
Within minutes the domain shows as active, and the certificate is issued automatically. Test it in a private browser window.
Step 4: The setting people forget
Your pages now live at two addresses. Search engines need one canonical answer:
- Point your site's canonical URL and sitemap at the new domain (in this blog: change
urlinconfig.jsonand redeploy) - Optionally add a redirect so
wwwgoes to the apex domain: Cloudflare → Rules → Redirect Rules
Troubleshooting
- "Pending verification": the domain is not on this Cloudflare account yet — finish Step 1-2 first
- SSL pending: certificates issue after DNS resolves; wait, then hard-refresh
- Old site still shows: your browser or Cloudflare cache — try a private window
For what you are hosting in the first place, see GitHub Pages vs Cloudflare Pages.
Need something like this built? I take freelance projects in streaming, web apps and automation. Get in touch.