View all Products Close Menu Menu
How to force HTTPS
Updated Friday September 11th 2020 / Category Web Hosting

If you want to make sure your website shows up as secure for your visitors, you can follow this guide.

Before proceeding

  • Make sure you have an SSL Certificate installed
  • If you don’t have one, you can follow the steps in this guide to install a free one

Forcing HTTPs

There are two key ways to do this. The first and easiest way, is to enable the Force HTTPS Redirection option in cPanel. Here are the steps:

  1. Login to cPanel
  2. Click on Domains under the Domains section
  3. Under Force HTTPS Redirection click on the switch to turn it on for your domain name
    (Note: cPanel won’t let you turn this option on, if you don’t have an SSL certificate installed)

The other way to do this, is by manually adding redirect code to your website’s .htaccess file. Here is the code you need:

RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301,NE]
Header always set Content-Security-Policy "upgrade-insecure-requests;"

You can add this redirect code by following these steps:

  1. Login to cPanel
  2. Click on File Manager under Files
  3. Navigate to the public_html folder, or the folder where your website is located
  4. Edit the .htaccess file
    1. If the file already exists, right click on it and click Edit
    2. If the file doesn’t exist, click the + File button to the top left of the page
  5. Paste the above code in at the top of the file
  6. Click Save Changes
Can’t find the answers you're looking for? Check out these other methods of support!