Knowledgebase: Shared Linux Hosting
Cloudflare SSL error
Posted by Arun J, Last modified by Arun J on 10 April 2019 10:23:45 PM
You may have come across issues where the Wordpress website using Cloudflare SSL shows default page or the wp-admin shows 404 error. You can try adding the following code in the .htaccess file of the website.
==
SetEnvIf X-Forwarded-Proto https HTTPS
==
This should be the first line in the .htaccess file. You will also have to add the following lines of code in the wp-config.php file to force the website to use SSL.
==
define('FORCE_SSL_ADMIN', true);
// in some setups HTTP_X_FORWARDED_PROTO might contain 
// a comma-separated list e.g. http,https
// so check for https existence
if (strpos($_SERVER['HTTP_X_FORWARDED_PROTO'], 'https') !== false)
       $_SERVER['HTTPS']='on';
==
The constant FORCE_SSL_ADMIN is set to true in the wp-config.php file to force all logins and all admin sessions to happen over SSL.
Further please also confirm that the site URL and home URL are correct i.e "https" is added.
(0 vote(s))
Helpful
Not helpful

Comments (0)