The latest version of chrome and firefox have started showing “Not Secure” warning in the address bar on the sites without SSL certificate. These certificates ensure that the sensitive data of your website’s visitors will be transferred over a secure and encrypted network.  So if your website has a valid SSL certificate, you need to redirect all your visitors from HTTP to HTTPS.

In order to redirect your HTTP traffic to HTTPS, add these rules to your .htaccess file:

RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

How to edit .httaccess file in cPanel:

1. Login to cPanel.
2. Go to File -> File Manager

file manager

3. Click on the settings icon.

4. Check “Show Hidden Files (dotfiles)”.

File manager cPanel

5. Click save.

6. Now go to the public_html folder and look for the .htaccess file.

7. Right click on .httaccess files and click on “Edit”

edit httaccess

8. Now an Edit pop up appears, asking about encoding. Click “Edit” button to continue.

9. Edit the file and “Save Changes” when done.