www CNAME not properly resolving to my Pages domain - Error code 522
I have a pages project up at https://rexipie.pages.dev. A while back I used Cloudflare domains to have https://rexipie.com serve my Pages content. Now I want https://www.rexipie.com to do the same.
I have added the CNAME record shown, but I get 522 errors when attempting to navigate to it.
When I check a third party DNS lookup, I see no CNAME records listed: https://www.nslookup.io/domains/rexipie.com/dns-records/#cloudflare
9 Replies
I tried making the CNAME record list rexipie.pages.dev as the authoritative name for www too, didn't work.
Hmm, I just did now and now it says the page is empty?
In pages settings, you should add www.rexipie.com in the custom domain section
Hmm
Works for me
oh oops, I was going to www.rexipie.pages.dev
www.rexipie.com works, thanks!
Yea two things, as Soham said, you need to add the custom domain within the Pages project
As for
When I check a third party DNS lookup, I see no CNAME records listed: https://www.nslookup.io/domains/rexipie.com/dns-records/#cloudflareIt's how Proxied CNAMEs work, Cloudflare resolves them internally and only responds with A/AAAA Records with their Proxy IPs
It has the A/AAAA records to Cloudflare as you'd expect yea
Also Search engines will punish you for duplicate content/it's bad seo, if www and apex serve the same things. If you care about that at all, you might just want to redirect instead: https://developers.cloudflare.com/pages/how-to/www-redirect/
Redirecting www to domain apex · Cloudflare Pages docs
In this guide, you will learn how to redirect the www subdomain to your apex domain (example.com). This is a common question and can be achieved by …
Oh interesting, thanks for the tip.
Oh and local storage isn't shared with www, I'll prob just do the redirect.