Just because you SSL installed in your cPanel service, doesn’t mean your website will use it!
Contrary to popular belief, web-browsers do not automatically upgrade ‘http://’ connections to the secure ‘https://’ version.

This can lead to sites showing as ‘Not Secure’.

Before starting this guide, please ensure you have a valid SSL certificate installed.
This can be checked by confirming you have a green padlock next to your domain name in the cPanel General information on the main cPanel dashboard.

There are 2 main methods to force ‘HTTPS Redirects’.

A) cPanel GUI Method

1. Click on ‘Domains’ in the cPanel dashboard

2. Toggle ‘Force HTPS Redirect’ to On

This change is not instant can take upto 1 hour, and will modify your sites ‘.htaccess’ file

B) Manually Adding ‘HTTPS Redirect’ into .htaccess

1. Open up File Manager

2. Navigate to ‘public_html’, right-click on ‘.htaccess’ and click ‘Edit’
If you do not see ‘.htaccess’ you may need to Enable Hidden Files or manually create the file

3. Add the following ‘codeblock’ after ‘RewriteBase /’

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

Before (For a WordPress Site):

After:

3. Test the site and redirect out in a new window.
We recommend typing in the full ‘http://’ link to ensure it automatically redirects

1 comment

  1. Clear and straight to the point, didn’t know about putting the rewrite rule in the default WordPress block – it looks much cleaner. Thanks James!

Leave a Reply

Your email address will not be published. Required fields are marked *