Cloudflare A record DNS for Cloudflare Pages

A Records are not recommended for the pages platform due to the distributed nature. The suggested process is to set a CNAME your root domain to your pages.dev address.

If you want to use Cloudflare DNS with Cloudflare Pages it can be tricky to get working due to 2 different systems needing to work.

  1. Cloudflare DNS needs to point to your pages URL.

You need to point a CNAME the root domain to your pages.dev URL. If you are moving nameservers it may take some time for this to process.

Cloudflare DNS pointing to Cloudflare Pages CNAME

  1. Cloudflare Pages needs to have custom domains setup.

In your pages admin, you need to set your custom domain here as well. This signals the domain you want to run your page so you don’t have others hosting your page.

Then you should see the your site at the address. This may take some time but if you use DNS over HTTP using Cloudflare it should be almost instant.

Cloudflare Pages admin showing a custom domain that is active.

Cloudflare Pages main page showing custom domain on list.