Force Visitor Browser to use SSL

This article will go through the steps to force a visitor's browser to use SSL and view the site securely. That is when a customer goes to http://www.domain.com it will display and error and force the site to use the SSL version.

Linux

  1. SSH into the server. If you are unfamiliar with SSH, please see How do I establish an SSH connection to my server?
  2. Make sure that mod_rewrite is active for the site in the HTTPD container
  3. Create an .htaccess file in the root of the site with the following content, substituting in your own domain:

RewriteEngine on

RewriteCond %{SERVER_PORT} !443$

RewriteRule ^(.*)$ https://www.domain.com:443/$1 [R=301,L]