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 an SSL server error. The issue was eventually resolved 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 should work properly, but it might 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.

Lightweight plugin, Heavyweight Security features. Get Pro and leverage your SSL certificate for WordPress security standards.