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
No description
No description
9 Replies
jax
jaxOP16mo ago
I tried making the CNAME record list rexipie.pages.dev as the authoritative name for www too, didn't work.
jax
jaxOP16mo ago
Hmm, I just did now and now it says the page is empty?
No description
Soham
Soham16mo ago
In pages settings, you should add www.rexipie.com in the custom domain section Hmm Works for me
jax
jaxOP16mo ago
oh oops, I was going to www.rexipie.pages.dev www.rexipie.com works, thanks!
Chaika
Chaika16mo ago
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/#cloudflare
It's how Proxied CNAMEs work, Cloudflare resolves them internally and only responds with A/AAAA Records with their Proxy IPs
Chaika
Chaika16mo ago
It has the A/AAAA records to Cloudflare as you'd expect yea
Chaika
Chaika16mo ago
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 …
jax
jaxOP16mo ago
Oh interesting, thanks for the tip. Oh and local storage isn't shared with www, I'll prob just do the redirect.
Want results from more Discord servers?
Add your server