Custom Domains and Pages

I love the simplicity of Cloudflare Pages but I find the documentation around adding custom domains to be a bit sparse.

I seem to be stuck in a loop of trying to get the custom domains verified.

Cloudflare is set to handle the domain and in the Pages UI I have added the custom domain in there. But it just stays on “verifying” and never changes.

I did have a different pages project on there and linked to the same domain previously. Do I perhaps need to delete and then add the domain back to Cloudflare again, before adding it to Pages through the UI? Or is there a different order of doing things?

I would really appreciate any help on this as it’s the only big gap I think in the Pages platform. It’s just not clear how Pages interacts with a Cloudflare managed domain.

It should work fine but try going through these steps:

  1. Go to your zone and delete the CNAME(s) for your domain which are pointing to pages.dev
  2. Remove the custom domain in the Pages UI
  3. Wait a few minutes
  4. Add it back

I wonder if because it was added previously, it’s getting a little stuck.

Thanks for the quick and detailed answer Walshy.

I’m trying that now. Would you recommend adding the “www” subdomain as well as the root domain when using pages for a simple website?

Thanks

I tried adding the root domain in the Pages UI and it immediately went to “inactive error”.

You definitely can. It’s your choice. I’d recommend adding a www subdomain but redirecting to the root. I hope to have a tutorial about this merged in the docs soon.

You made sure to remove the CNAME beforehand and it’s definitely not tied to any other projects?

Thanks.
No, all other Pages projects have been removed. And I definitely removed the CNAMEs in the main Cloudflare dashboard first.
I did just read about a similar issue in the Community Pages where someone’s domain had been banned because of moving it between different Github repos/pages projects. They eventually had to reach out to the Abuse team to get the ban lifted.
I have a feeling that might be the issue here. I’ve asked on Discord.