How to force SSL with .htaccess

It is possible to force a HTTPS connectinon on your website by adding the following rules to your website's  .htacess file:

RewriteRule^(.*)$https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

The .htacess file needs to be placed inside the site's root folder. Depending on how your website was setup, whether it was a sub folder for example, the .htaccess file should be placed in the correct corresponding folder.
You can also edit or create the .htacess file through FTP or the file manager available in your control panel.
  • 1 Users Found This Useful
Was this answer helpful?

Related Articles

What is SSL?

What is SSL? SSL, or Secure Sockets Layer, is an encryption technology created by Netscape. It...

Why do I need SSL?

If you require sensitive information to be entered on your web site, such as credit card numbers...

What is a Certificate Authority (CA) ?

A certificate authority is an entity which issues digital certificates to organizations or people...

How do SSL certificates compare between certificate authorities?

Verisign certificates are better because they cost so much more, right? Not necessarily. You can...

What is Browser Compatibility?

The certificate that you purchase to secure your web site must be digitally signed by another...