Knowledgebase

How to force ssl via .htaccess file :  Print this Article

To force your website to load via https: after installing an ssl certificate do the following:

1: Open the public_html (or relevant domain's folder)

2: Edit / create a file called .htaccess

3: Put the following lines in the file :

RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
4: Save and close the file

5: Load and test the site.

Url's should now be loading as https:// secured pages.

Was this answer helpful?

Also Read

SSL Certificate in Website Panel
To add an SSL Certificate to Website Panel you must first generate an CSR to purchase an SSL...
How To Export SSL from IIS 7 / Export Private Key
SSL Certificate / Export your private key Follow the steps below to export your Certificate and...