Author Topic: How to Force Greenpadlock SSL on Cpanel Hosting  (Read 234 times)

christogonus

  • Newbie
  • *
  • Posts: 7
    • View Profile
How to Force Greenpadlock SSL on Cpanel Hosting
« on: April 01, 2019, 01:57:19 PM »
Hi there,

If you have installed SSL on your server and still see the insecure note in web browser, then this is what I think you should do.

This post is not about the step-by-step guide to SSL Certificate installation. You can contact your hosting provider to do that for you. It doesnt take up to an hour to complete.

Forcing the use of HTTPS:// on your site will ensure that visitors to your site are always using HTTPS:// and aren't able to access an insecure HTTP:// URL.

This is recommended since if a visitor does access your site as HTTP://, everything will be marked as "Not Secure".

Below code is for forcing HTTPs on an Apache webserver. If you are using another webserver such as lighttpd, nginx, etc you will need to contact your web hosting provider for assistance.

Add the following code to the .htaccess file in your webhosting account:

Code: [Select]
RewriteEngine On
RewriteCond %{HTTP_HOST} affimpact\.com [NC]
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://www.affimpact.com/$1 [R,L]

NOTE: change affimpact to your domain name, and com to your TLD (info, org, net, etc)

Once this change is made your site will no longer be accessible on the insecure "HTTP://" URLs and all visitors will be redirected to "HTTPS://" instead.

If you have any questions, then you can ask.