© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
Cloudflare DevelopersCD
Cloudflare Developers•13mo ago•
35 replies
clive

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:

CNAME custom-domain.com   website.pages.dev Proxied Auto
CNAME custom-domain.com   website.pages.dev Proxied Auto


And I get the following messages on the DNS records of the pages website:

Add an A, AAAA, or CNAME record for www so that www.custom-domain.com will resolve.

Add an A, AAAA, or CNAME record for your root domain so that custom-domain.com will resolve.
Add an A, AAAA, or CNAME record for www so that www.custom-domain.com will resolve.

Add an A, AAAA, or CNAME record for your root domain so that custom-domain.com will resolve.


I thought I was smart and I set the CNAME for
www
www
->
custom-domain.com
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
custom-domain.com
resolves properly. But
www.custom-domain
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.
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
192.0.2.1
as the IP address for A Record for
www
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
www.custom-domain.com
but dig gives an error for
www.custom-domain.com
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).
Redirecting www to domain apex · Cloudflare Pages docs
Cloudflare Developers banner
Cloudflare DevelopersJoin
Welcome to the official Cloudflare Developers server. Here you can ask for help and stay updated with the latest news
85,042Members
Resources
Was this page helpful?

Similar Threads

Recent Announcements

Similar Threads

Website highjacked - pointing to Cloudflare DNS
Cloudflare DevelopersCDCloudflare Developers / general-help
14mo ago
DNS record for origin rule
Cloudflare DevelopersCDCloudflare Developers / general-help
2y ago
Cloudflare DNS is not working for some websites
Cloudflare DevelopersCDCloudflare Developers / general-help
2y ago
DNS record help
Cloudflare DevelopersCDCloudflare Developers / general-help
4mo ago