DNS A Record for Cloudflare Pages website
What should be the IP address for the DNS A Record for my cloudflare hosted pages website's custom domain?
My current DNS record for the pages.dev's custom doamin is:
And I get the following messages on the DNS records of the pages website:
I thought I was smart and I set the CNAME for
www
-> custom-domain.com
since there's a CNAME (custom-domain.com -> website.pages.dev) already. But nope! I got 522 errors So I undid it . And I read this as well https://community.cloudflare.com/t/where-can-i-find-the-ip-adress-of-the-web-server-on-cloudflare-pages/636819/7?u=pratt which says "You need to delete any records that you created for www. Custom hostnames for Cloudflare Pages need to be added from the Pages menus, not the DNS app. The appropriate DNS entry will be created automatically since you use Cloudflare DNS."
As it stands now, the apex domain custom-domain.com
resolves properly. But www.custom-domain
doesn't resolve properly. I get DNS_PROBE_POSSIBLE - www.custom-domain.com DNS address could not be found. Diagnosing the problem.
.
How do i fix this? I haven't worked with DNS records for many years. Please help.
edit:
I just put 192.0.2.1
as the IP address for A Record for www
as per this https://developers.cloudflare.com/pages/how-to/www-redirect/ Haven;t set the bulk redirection list. Will this work? Waiting for some time to confirm
Nope.... not yet
whatsmyDNS gives noerror for www.custom-domain.com
but dig gives an error for www.custom-domain.com
Nope....getting 522 errors again.Cloudflare Docs
Redirecting www to domain apex · Cloudflare Pages docs
Learn how to redirect a www subdomain to your apex domain (example.com).
17 Replies
You just need to add
www.custom-domain.com
as a Custom Domain from within the Pages ProjectDone that
what's the custom domain? Could just be dns cache
ativerc.com
What's the record on
www
point to? If you modified it to 192.0.2.1, you'll need to delete that and readd the Custom domain, or manually make the CNAME to your pages.devCNAME -> ativerc.com zxybz.pages.dev
no, for the
www
subdomainA www 192.0.2.1
yea, delete and readd Custom Domain in Pages Project would be the easiest way to get it proper again
192.0.2.1 is special for bulk redirects because it's basically saying "Some setting in this zone/account (bulk redirects) will handle the traffic before it reaches an origin to try", but Pages is a separate origin in ways/requires a specific setup
ativerc.com works. www.ativerc.com doesn't.
Deleting that A record right now
Will wait and see if it propagates. But to be honest I added the custom domain on pages a few days ago and if it had to happen, it would have worked by now.
What you should end up with is:
The
www.ativerc.com
hostname listed under your Pages Project Custom Domains, leaving you with two (being your root and www)
the www
record in your DNS being a cname to your pages.devOh right right
seems fine to me now

yeah I added the www subdomain as well . So I have CNAME for both ativerc.com and www to xyz.pages.dev
thanks dude!
wait
@Chaika
Need to learn about DNS then
should be just dns cache
dig www.ativerc.com @1.1.1.1 +short 172.67.196.152 104.21.84.202
oh okay
will keep checking
BTW, any pointers where I more I have to learn about DNS. Things that I remember are:
1. DNS lookup sequence: DNS Recursor -> Root DNS Servers -> TLD Server -> Authoritative DNS servers
2. DNS Records: A, AAAA, CNAME, TXT, MX, etc.
And that's about it.
Commands:
dig
, doggo
, nslookup
Things that I don't remeber so well, DNS zones, types of domains ( i remember FQDN and apex), etc.
Okay, I just checked with my ISP's DNS server, and it worked....
I don't know how DNS can't be propagated for 1.1.1.1
more DNS weirdness:
Same via 9.9.9.9. dig fails on my pc. not on my router.
@Chaika give this a look
All I can do is have a screenshot to fix/troubleshoot this tomorrow
haha
I had to come back and make an updte here....
I had chrome and 10 tabs of terminator open. and discord open.
I shut off discord, then chrome adn like 8 tabs of terminal. And ust for kicks I thought it would be nice to try digging the FQDN again. And it worked.....so I wonder if shutting down chrome updated it.
don't knowI mean there's books like "DNS & BIND" or simply just experimenting/playing around with stuff. Go to the root, play around with BIND and hosting your own nameservers, etc.
The latency on the dig from your laptop seems too low to be possible (3 ms), perhaps your router or ISP is hijacking dns to their own/caching proxy