Cloudflare Pages & business domains

How to Connect a Custom Domain to Cloudflare Pages

A practical domain setup checklist for a business website built with GitHub, Cloudflare Pages, and ChatGPT.

Add your domain inside the Pages project before pointing DNS at it. Then follow the setup for either your root domain or a subdomain, preserve existing email records, and test the live address. A working deployment and a working custom domain are separate checks.

Want the broader build-to-launch process? Explore the $99.99 Guide from Colby Technologies for building a website using ChatGPT, GitHub, and Cloudflare.

1. Choose your website address before changing settings

Write down the exact address visitors should use. example.com is the root, also called the apex domain. www.example.com and shop.example.com are subdomains. That distinction determines which setup instructions apply.

According to Cloudflare's custom domain documentation, a Pages apex domain requires a Cloudflare DNS zone in the account containing the project, with nameservers pointing to Cloudflare. A subdomain can use external DNS with a CNAME pointing to the project's pages.dev address.

Decide whether you intend to use the root address, www, or both. Keep that decision in your launch notes so your navigation, marketing materials, and search metadata use the same preferred address.

2. Review existing DNS before moving nameservers

Domain ownership, DNS management, and website hosting are separate responsibilities. Record where each is managed and confirm you can sign in before starting. Keep the domain registration under an account you control.

For a full DNS move, follow Cloudflare's nameserver setup instructions and review the imported DNS records against your current provider. An automatic scan is a starting point; confirm records for the services you actually use.

Pay particular attention to business email and verification records. Save a private copy of the current configuration, then compare record names, types, and values. Keep mail service instructions handy and avoid deleting records just because they are unrelated to the website.

  • Identify the current domain registrar and DNS provider.
  • Record existing website, mail, and verification settings.
  • Confirm who can make changes if the domain belongs to a business partner.
  • Choose a time when you can test the result and respond to problems.

3. Associate the domain with the Pages project

Open Cloudflare's Workers & Pages, select your Pages project, and open Custom domains. Choose Set up a domain, enter the exact hostname, and follow the prompts.

For externally managed subdomains, add the requested CNAME at the DNS provider. Use your actual project's destination, such as your-project.pages.dev, rather than copying an example literally.

Cloudflare explicitly warns that creating a CNAME without first associating that hostname inside Pages can produce a 522 error. Check the project association before repeatedly changing the record. The official custom domain steps cover both paths.

4. Verify the domain and separate deployment problems

First open the project's pages.dev address. If the website fails there too, investigate the deployment with the Cloudflare Pages build troubleshooting checklist. If only the custom domain fails, concentrate on its association, DNS, and verification state.

Cloudflare's Pages debugging documentation explains that redirects, Access, or Workers can block domain validation. Restrictive CAA records can also interfere with certificate issuance. Follow the relevant documented check instead of removing unrelated settings.

Record what you observe: the exact address, error message, and project status. That small amount of evidence makes asking for help much more effective than reporting that the website is broken.

5. Finish the launch beyond the homepage

Open the custom address on your phone and desktop. Visit an interior page directly, test navigation, and confirm images appear. Send a real contact-form test and check the intended inbox. Also test your regular business email if DNS changed.

Review page titles, canonical addresses, and the sitemap for the chosen production domain. Save the project name, repository location, domain renewal details, and successful launch date. These notes help you maintain the website later without rebuilding your understanding from scratch.

If the accounts are confusing, first read domain, hosting, and business email explained. Its account map separates renewals, administrators, and mail dependencies before you change settings.

Want a clear path from your idea to a live website?

The Colby Technologies digital website guide is $99.99. Colby will personally assist if you get stuck. If resolving the issue requires Colby to perform additional hands-on work, extra fees may apply and will be approved before work begins.