1. Home
  2. Hosting Management
  3. SSL Installation
  4. How to manually Redirect HTTP to HTTPS

How to manually Redirect HTTP to HTTPS

Once you have purchased and installed an SSL Certificate, you should automatically redirect visitors to the secure version of your website ( https:// ).

This ensures data sent to and from your website is securely encrypted. Besides this, according to Google – HTTPS is now a ranking signal among some other factors.

How to Redirect HTTP Requests to HTTPS in cPanel

1) Once you are logged in cPanel, go to Domains

2) On the Domains page, you will see a list with all of your websites and you have to switch to ON to force an HTTPS redirect.

Force HTTPS Redirect in cPanel
Force HTTPS Redirect > ON

In case you want to force a redirect for a subdomain or an addon domain, which is not listed, please click on the gearbox icon which will show the associated subdomains. 

3) After you will do this, give it 1-2 minutes for the change to take effect and after that clear your browser cache and try again to load your website.

How to Manually Redirect HTTP Requests to HTTPS using .htaccess

However, if for some reasons your website is not working after you enabled the force redirect in cPanel, you should try to do this via your .htaccess file.

1) Edit/Create a .htaccess file in the folder your site is being served from (normally public_html). You can easily edit the .htaccess file using an FTP client or through the online File Manager in cPanel.

2) Add the following code to the .htaccess file:

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

3) Save the file and check the results in your web browser by trying to access your site using standard HTTP rather than HTTPS.

If it is working correctly, you should be automatically redirected to https.

Please Note: If you do not have an SSL certificate installed, this could cause errors. Please make sure that you have an SSL certificate installed and properly working before attempting this.

If anything goes wrong for any reason, please don’t hesitate to contact our Support team by opening a ticket in your Lab.

Updated on August 15, 2019

Was this article helpful?

Related Articles

Do you still need help?
Get amazingly fast Support from our Happiness Engineers!
Submit Ticket