404 pages Redirect rules

www not redirecting to non-www on cloudflare

Recently I encountered an interesting issue with redirection from www to non-www. The non www site worked perfectly after migration to SSL, but the www site gave a 404 not found error, or a SSL server error.

The issue was solved in the end by the hosting company.

If a user has connected a site to Cloudflare using the service offered by many hosting providers within Cpanel then ONLY the domain at the root will be used.

If you have installed your site in a folder marked “mysite.com” then automatically connecting to Cloudflare means only http://mysite.com is actually running.

The www version will or “may” not work.

To convert your site to https you must first remove the site from Cloudflare and ensure that the name servers recommended by their hosting provider is being used.

Then do the conversion of the site and get everything set up correctly.

Finally they must manually re-add the site back into Cloudflare through the Cloudflare interface and NOT using the auto feature in Cpanel.

Once that is done and the name servers update the site will direct correctly to the www or non-www version as nominated in WordPress.

Related Articles

  • Redirect non www to www or www to non www domains in .htaccess

    If you have an ssl certificate on a www domain, but not on the non www domain, you’ll find that your non www domain won’t function anymore if you move...
  • Manually insert .htaccess redirect http to https

    Really Simple SSL tries to insert the correct .htaccess redirect rules. There are several server configurations, which each require their own .htaccess redirect. The plugin tries to detect which rule...
  • Manually add .htaccess redirect

    The Really Simple SSL plugin tries to insert the .htaccess redirect automatically, but in some cases either the testpage is blocked by security settings (so the plugin cannot determine which...
  • Disabling ssl for one page only

    The problem: services that don’t support SSL I think the best way to go is to get your entire site on SSL. But sometimes there are services that are not...

Leave a Comment