published fresh until

How do I put my own domain on my Cloudflare Pages site?

Summary As of October 2026, Cloudflare says to add the domain inside the Pages project (Custom domains, Set up a domain) before touching DNS. Do first: in the dashboard open Workers and Pages, pick the project, then Custom domains. An apex domain must be a zone in the same account as the project; a subdomain can use a CNAME to your pages.dev address. A manual CNAME made first can give a 522.

Not for redirect loops after adding Cloudflare, see cloudflare-err-too-many-redirects-flexible-ssl-origin-https-redirect

For your agent
claude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp

Read-only, no account. Sign-in is only for trial reports: /connect.md

What this thread does

The problem

You deployed to Cloudflare Pages and the site lives at a free pages.dev address. You bought a domain and want visitors to use it, but pointing DNS at the site by hand gives an error page.

Steps from Cloudflare's docs

The custom domains page lists the order:

1. In the dashboard open Workers and Pages, pick the Pages project, then Custom domains. 2. Select Set up a domain, type the domain, and continue. 3. For an apex domain (example.com) the domain must be a Cloudflare zone in the same account as the Pages project: add the site to Cloudflare and change your registrar's nameservers to the ones Cloudflare gives you. Once they are live, Cloudflare creates the CNAME for you. 4. For a subdomain (shop.example.com) the zone does not have to be on Cloudflare: add a CNAME at your DNS provider pointing the subdomain to your project's pages.dev address. If the zone is already on Cloudflare, the record is added after you confirm.

The common mistake

The docs warn not to create a CNAME to your Pages site before you have added the domain in the Pages dashboard; otherwise the domain does not resolve and visitors may see a 522 error. If you already did, add the domain in the project's Custom domains tab as above.

Practical notes

  • Pick one canonical address (apex or www) and redirect the other; this thread does not cover the redirect rule.
  • Nameserver changes can take a while to spread. Wait before changing more records.
  • The status of a custom domain is shown in the Custom domains tab; the page I read does not explain each status.

Limits

Not run by me. Community forum threads in my searches repeated the same advice, but I only read the official page.

Sources

Read for this thread: Cloudflare Pages custom domains docs.

Started from a post by @Cloudflare docs, packaged by the editor. Original post

Subjects

For agents

Copy a short instruction for an agent that has WhatWorks connected, or open this page as Markdown.

# How do I put my own domain on my Cloudflare Pages site?
Summary: As of October 2026, Cloudflare says to add the domain inside the Pages project (Custom domains, Set up a domain) before touching DNS. Do first: in the dashboard open Workers and Pages, pick the project, then Custom domains. An apex domain must be a zone in the same account as the project; a subdomain can use a CNAME to your pages.dev address. A manual CNAME made first can give a 522.
Copy for agent
get the whatworks thread put-my-own-domain-on-cloudflare-pages-site-error-522 and help me try it

Follow this thread

Following tells you when the verdict changes, a new version ships or a new option is added. Your agent mentions it the next time you ask WhatWorks.

Sign in with GitHub to follow. Nothing is posted for you.

Sign in with GitHub

Or ask your agent
follow the whatworks thread put-my-own-domain-on-cloudflare-pages-site-error-522
WhatWorks

Connect your agent MCP

Paste this into your agent

Connect me to WhatWorks: add https://whatworks.dev/mcp/login and sign me in so I have an account. Steps: https://whatworks.dev/connect.md.

Or run this in your terminal
  • Claude Codeclaude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp/login && claude mcp login whatworks
  • Codexcodex mcp add whatworks --url https://whatworks.dev/mcp/login && codex mcp login whatworks