Force HTTPS on cPanel Based Sites SSL / TLS

How can I make my site always us SSL?
  • Edit or create the file named .htaccess
  • Add the following to the .htaccess file:
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
 
  • Save the .htaccess file in the root of your web site.