I searched this forum and found several posts on this or similar problems, but none of them seemed to match my scenario.
I’m using Cloudflare tunneling to connect to my website. I set up two CNAME records, one for the root url and one for “www.” with both pointing to the “hash code” of my tunnel.
With this setup, I can access the “www” page, but attempting to access the non-www page results in an http 404 error. Oddly, if I change the CNAME record for “www” to point to the non-www page instead of the tunnel directly, it still works, but the non-www page itself does not work. I find this baffling and suspect that I don’t fully understand how this is supposed to work.
I can solve this problem by setting up a page redirect of the non-www url to the www url. But I don’t understand why the DNS approach isn’t working.