To insure your website displays your SSL certificate all the time, please add one of the following codes to the top of your ".htaccess" file located in the public_html folder. This will be located in the file directory of your hosting panel. Be sure to enable hidden ".(dot)" files to see this file. If the ".htaccess" file is not present simply create it. Be sure to create a backup of this file in case you need to revert the changes.
**Replace "exampledomain.com" with your domain.
Note: Depending on the servers setings you may need to remove "RewritEngine on" or add a "#" directly before it to comment it out.
RewritEngine on
#rewrite to https and www.
#First we turn on https if its off
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
#Second, we rewrite any request to the wrong domain to use the correct one (here www.)
RewriteCond %{HTTP_HOST} ^exampledomain.com [NC]
RewriteRule ^(.*)$ http://www.exampledomain.com/$1 [L,R=301]
#Result: https://www.exampledomain.com
RewritEngine on
#rewrite to https and NON-www.
#First we turn on https if its off
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
#Second we rewrite any request to the wrong domain to use the correct one (here NON-www.)
RewriteCond %{HTTP_HOST} !^exampledomain.com$ [NC]
RewriteRule ^(.*)$ http://exampledomain.com/$1 [L,R=301]
#Result: https://exampledomain.com
RewritEngine on
#Turn on https if off
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
#Result: https://exampledomain.com or https://www.exampledomain.com
For more information please view our complete guide to SSL and SEO.