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

Prior to completing these steps you need to ensure that a valid SSL certificate is in place for the domain you want to force SSL on.  This can be a purchased/EV SSL certificate or a free Let'sEncrypt certificate.

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.

Was this answer helpful?

Add to Favourites Add to Favourites      Print this Article Print this Article

Also Read
How do I update the name servers on my domain? (Views: 5943)
How to raise a support ticket (Views: 529)
Creating a WHM Package (Views: 1615)
SpamExperts - How to configure MX records and local / remote mail routing (Views: 2711)
Do my customers get their own cPanel? (Views: 5290)