Custom domain for CF Page not working

I’m another one trying to migrate their site over from Netlify and being stumped by the process of attaching a custom domain.

I created a page on Cloudflare Pages and hooked it up to my github repo, this works fine and the page at .pages.dev is fine.
I have followed the instructions to disable DNSSEC at my host (Google), change the name servers over to Cloudflare’s, and set up DNS at Cloudflare. It says the domain is active and protected by Cloudflare.

I set a CNAME entry for each www and mytopLeveldomain.dev, both pointing at mypage.pages.dev.

Still - trying to access www.mypage.dev gets a 522/Connection timed out error and trying to access mypage.dev (without the www) gets “We’re having trouble finding that site”.

Help?

Welcome to the Cloudflare Community!

You cannot just create the CNAMEs manually. You need to add the Custom domain under Pages Custom Domains tab, and let it create/replace the records for you. Custom domains · Cloudflare Pages docs
Magic Link: https://dash.cloudflare.com/?to=/:account/pages/view/:pages-project/domains
You’d need to add the www subdomain there as well, or redirect it to your apex: Redirecting www to domain apex · Cloudflare Pages docs. Redirecting is usually preferred as Search engines otherwise see duplicate content from both www and apex serving the same, and it can be confusing for visitors. If you were using www before, you would want to go the other way (redirect apex → www, add www as custom domain)

Hi, and thanks for trying to help.

I deleted the domain and readded it. When I added it to the page, it literally said “hey we’ll be updating this CNAME entry” and it was the exact thing I’d already set it to. Digging around in previous support threads (there are so many on this topic, why is it so hard?) had led to that.
Already followed the redirect instructions. It appears that is working now, but both the apex and the www still lead to a 522.

Right, it will be the same as the one you manually created but you need to add it that way anyway and let it replace it. It just needs to be in that list of Custom Domains or it won’t work, it’s like an allowlist of host headers/domains.

You mean the redirect is working, but not the site itself? What’s the status of the Custom Domain under the Pages Project? Could you share the url to the site?

Thanks for sharing. You can edit it out now if you want.
It looks like you configured the redirect backwards, your apex is redirecting to www which as you have shown there has no real origin. You probably want www → apex. If you followed the Pages guide, double check your source and dest URLs. Page Rules or Redirect Rules under Rules → Redirect Rules could also be causing the redirect.

Hi again, thanks again for trying to help, but I don’t understand and this shouldn’t be this complicated. I’m going to go back to Netlify and take my chances with the whole “if someone DDOSes me I might get a 100k bill” thing.