There was a problem loading the comments.

How To: Adding a HTTPS rewrite to your .htaccess file.

Support Portal  »  Knowledgebase  »  Viewing Article

  Print

When you add an SSL Certificate to your domain your site will not automatically redirect to the secure version.  This means you will need some coding to "force HTTPS" to be used.  You can do this by adding code to your .htaccess file.  

The below is an example that needs to be added to the top of the .htaccess file of your domain.

RewriteEngine On
RewriteCond %{HTTPS} !on
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}

This code does not work for all sites, but it does work for a large amount.  If this does not work for you we advise consulting a website developer.


Share via

Related Articles

© Hosting UK