How to correctly setup DNS records for my domain?

Hi Cloudflare community,

I have started to use and love cloudflare pages (pro and free). I have setup my own domain and set the DNS records like so:
Type:CNAME:, Name:domain.com, Content: pagesdomain.pages.dev

This has worked for all the domains, I can access them at https://domain.com
However, when i try to add www it doesn’t work.
I’ve tried
Type:CNAME:, Name:www Content: pagesdomain.pages.dev

which is similar to what I’ve seen at my hold hosts config. But I get an error trying to access it.

May I ask how to correctly set this up?

Thank you very muchin advance!

You need to add the www version of the name as a custom domain to the Pages project, in the “Custom Domains” tab of the project, so the server knows to answer to that name.

You don’t need to create the DNS entry yourself; if you add the custom domain to the project the system will create it for you.

1 Like

I see, thanks, I did that now, it added the www again by itself I think. Thanks a lot!

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.