sales[at]capitanhostingcom | +63.915.270.72.23

How Can We Help?

How force my domain to use HTTPS (for any site)?

Capitan Hosting

Add the following code to your .htaccess file and make sure to change ‘example.com’ to your actual domain name:

 

RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301,NE]

Table of Contents