How do I force SSL / HTTPS on my domain or site

 

To force SSL connections to a site, you need use the cPanel File Manager to add or edit the .htaccess file for the folder containing the site.

You need to ensure that you show hidden files (dotfiles) when opening the File Manager.

Add the following at the top of the file:


RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]


Clear your browser cache and re-test.

When viewing the site, your browser should now automatically load over HTTPS.
 

Did you find this article helpful?

 Print this Article


You might also find useful

Default Nameservers for Shared Hosting

How do I add another domain to my Hosting Account?

How do I get an SSL certificate for my domain?

How do I update the name servers on my domain?

Self Signed SSL Certificates

Powered by WHMCompleteSolution