Cloudflare pages, custom domain (with HTSTS-only TLD)

Hello,

I created a Cloudflare pages project, and I have a custom domain to use with it. The domain has a ‘.dev’ TLD, which is HTSTS-only (enforced by default by the browser for those TLDs), I’m not sure if this matters.

In the portal of my Registrar I have set the nameservers to be those of cloudflare, I have enabled ‘full TLS’ in the cloudflare portal, I added a CNAME record for www.mydomain.dev to target mypage.pages.dev

However, when I try to browse to mydomain.dev I get a cloudflare page that says 'Error 522, connection timed out, cloudflare is reachabl but host is not). The host here is obviously cloudflare itself (*.pages.dev is cloudflare’s server).

Where did I go wrong?

If you want the root domain to also work, you need to add a CNAME for the root domain to mypage.pages.dev and add it as a custom domain to the pages project.