How To Force SSL / HTTPS On A Domain/Website

Before completing the steps below make sure you have a valid SSL certificate in place for the domain/website you want to force SSL on.

For example this could be a free Lets Encrypt SSL certificate.

To force SSL connections to a site, you need use either an FTP client such as Filezilla or cPanel File Manager to add or edit the .htaccess file for the folder containing the site.

If you are using cPanel File Manager you will need to ensure that you show hidden files (dotfiles) when opening the File Manager.

Add the following at the top of the .htaccess file:

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

Clear your browser cache and then navigate to the site to test the new rewrite condition and rule.

When viewing the site, your browser should now automatically load the site over HTTPS.
  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

Default Nameservers

If you are using shared hosting here at SOurce Host the default nameservers...

How To Transfer A Domain Into Your Account

Before initiating the transfer of a non-UK domain (e.g. .COM / .NET / .ORG) you will need to...

What Is Our IPS TAG?

When transferring your .co.uk or uk domain to Source Host you may be asked for our IPS Tag. Our...

Powered by WHMCompleteSolution