Cloudflare Pages not recognizing that the custom domain is already hosted with CF

For Workes & Pages, what is the name of the domain?

friendwithpaws-z52.pages.dev

What is the error number?

N/A

What is the error message?

It’s asking me to host DNS with CF. It already is.

What is the issue or error you’re encountering

I’m trying to add friendwithpaws.com as custom domain to this CF page. It worked before, but now is not letting me, telling me that the DNS needs to be hosted with CF. The only issue is, it already is.

Are the pages project and the domain in the same Cloudflare account?

Yup. They were both in a diffferent account, but both domain and pages property are in the same account.

I waited over 24h as I thought maybe it needs time to propagate, but the issue pressists.

Can you try adding the CNAME record for the pages project manually?

for the www yes → it shows the dialogue for external DNS provider, for the root domain it’s refusing to let me add a cname, and asking to move the site to CF.

What is refusing to let you add a CNAME for the root? Can you show a screenshot?

Absolutely!

When I do a www subdomain, I get the option to do ‘external’ DNS.
For the root domain, only this pops up:

Can you try to go to your DNS records and just create the CNAME record?

This is the option when doing a www subdmain

Unfortunately it’s working as expected…

The www one which is configured from the Pages dash works correctly.

The root domain with the same CNAME gets a: Error code 522

And if you try adding the custom hostname again after manually creating the record?

Same issue persists. It’s asking me to set up the domain on CF.

Have you used the same domain with a pages project before?

I’ve just created a new project and can add apex domains without any problems. However, I see that there is another topic where someone has the exact same problem that you have.

Yup. This was on my private account, but I’ve moved it to a dedicated one where all related projects live.

Steps I took:

  1. Removed the domain from the previous pages (old account)
  2. Removed the project from old account
  3. Moved Domain to New Account (NS update)
  4. Created the Pages property
  5. Issue with adding the domain

It’s not an issue with completely ‘new’ domains which never were moved between two accounts, but seems to be an issue here.

Yes, this seems to be similar: Issue in setting up of custom domain on cloudflare pages

The keyword which is indicating that this may be the same core issue is “production”, meaning it likely was previously configured with the same domain there as well.

As a last thing, could you try to remove the zone from your previous account? If that doesn’t help, someone from Cloudflare probably needs to take a look at this.

2 Likes

Thank you @Laudian, I did not think of that and it did the trick. It was marked as ‘moved’ but as long as I didn’t select remove from cloudflare it wasn’t working.

You’re a champ! Many thanks. (btw, love your profile picture)

2 Likes

I’m glad it worked, though I don’t think it should be necessary to delete the old zone first.

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.