Www version not working

My site (https://forestpathology.org) is set up for non-www. Before I used Cloudflare, www.forestpathology.org would automatically go to forestpathology_org (this forum won’t let me put in more “links”) in a browser.

With Cloudflare, the non-www version is working fine, but the www version gives “Server not Found - Hmm, we’re having trouble reaching that site” in Firefox.

There was a CNAME record for www.forestpathology_org pointing to www.forestpathology.org.cdn.cloudflare_net. I couldn’t turn it on in the Coudflare cPanel app. So I edited it to point to forestpathology_org and turned it on in Cloudflare. Made sense to me, but still doesn’t work.

Ooops! I checked again just before submitting this, and now www . . . is working. Guess I didn’t wait long enough after making that change.

But now any access seems to go straight to my server (checking the Network developer tool tab in browser shows the IP for my server, before it was a Cloudflare IP). I’m stumped.

1 Like

I don’t know why the disconnection from Cloudflare happened for me, but when I cleared my computer’s DNS cache and cleared all recent history in browser, then it started going to Cloudflare again. So problem solved for now, I guess, until it isn’t again :grin:

But I guess I do still have a question. Is it better to have that www to non-www CNAME record turned on in Cloudflare, or off? In the latter case it looks like my server handles the ‘redirect’ and then Cloudflare handles the non-www page.

If Canonical URL is non-www, (or the other way), this tutorial has a great way to handle it:


Thanks very much for ‘redirecting’ me to the tutorial. It raises a few more questions.

  1. It shows in the figure the DNS record is an A record. I already have a CNAME record like this:
    www.forestpathology.org. 1400 IN CNAME www.forestpathology.org.cdn.cloudflare.net
    Should I delete that record before making the new one pointing to the dummy IP? Otherwise it seems they would conflict.

  2. In the page rule, would forestpathology.org/* also represent the domain with nothing after slash?

  3. Oh, and in this case is it best to use 301-permanent or 302-temporary redirect?

  1. You can keep that CNAME. If it’s set to :orange:, then the Page Rule will intercept the request and forward the user to the non-www.
  2. example.com/* will match blank, and any path/file.
  3. I’d use a 301 because I commit to that canonical URL.
1 Like

Thank you so much!

My hosting’s Zone Editor (where I’m supposed to make DNS changes) wouldn’t let me keep both, so I went ahead and deleted the CNAME record. Now just waiting for the DNS changes to propagate to Cloudflare. Seemed much faster first time.

1 Like

This topic was automatically closed after 31 days. New replies are no longer allowed.