Https and www don't redirect

I have several domains on cloudflare that are pointing to cloudlflare pages that only work if they're typed as https://example.com or example.com. They do not work if you type https://www.example.com or www.example.com. There are two CNAMES in the DNS. www points to example.com and example.com points to example.pages.dev

I also have wordpress sites, they have one A record that of course points to an IP and one CNAME that points to example.com and they have no issues at all when accessing http://www or www. All these websites are on cloudflare DNS.

Further, how do I diagnose such an issue? I saw in an earlier post the curl command being used. Can you give me pointers how to learn/use it in this case?

I've done the basic checks, turned on turned off Cloudflare on the website, waited a week or more and the issue still exists. 

Example affected site: ekaprep.com

The CNAME for www, did you enter that by hand? For Cloudflare Pages, you need to add your www hostname under “Custom Domains” for Pages (which will also create the correct CNAME for you). Or you could set up a redirect for www to the apex domain, depending on your preference.

1 Like

Thank you for your reply SJR. I didn’t do by hand, pages automated it the process.
I did note that when pages suggested to add the CNAME, the CNAME value being displayed was empty. But I just went through the process and it worked.

Here’s the current config.

Note there is no A record value. Those are the only two DNS entries (apart from email and SPF etc.)

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