Force browsers to the HTTPS version of your site

After writing my posts about the benefits of HTTPS I thought it might be a good idea to write a short post letting you know how to easily send visitors to the HTTPS version of your site rather than the HTTP version.

Open your .htaccess file in the root of your website (where your main index file is). If you don’t see one then you either need to tell your FTP client to display hidden files or you may need to create a new .htaccess file.

Enter the text as follows, customising it to the URL of your site:

RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://hostsynergy.co.uk/$1 [R,L]

That’s it, all users going to any page on your site should now have it server up using HTTPS

Simples!

0 replies

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

Your email address will not be published. Required fields are marked *