Force SSL (https instead of http)

In some cases it will be necessary to install an SSL certificate on our website for security reasons, trust, … Especially in those pages that contain forms or stores that handle sensitive data of our users. Here we will show you how to force your web page to always use SSL connection (shows https instead of http).

Force SSL in a web

To force the use of SSL connection on our server (show https instead of http) we will have to add the following lines in the .htaccess file:

* Remember to change YOURDOMAIN by the name of your domain

 

Force SSL in a directory

In case you need to force the use of SSL connection in a certain directory or folder, the following lines should be included in the .htaccess file:

* Remember to change YOURDOMAIN by  your domain name and FOLDER by the name of the folder to which we want to force the SSL connection.

 

Google takes the addresses http: // and https: // as different so we must add both in Google Webmasters Tools

In some hosting providers it will be necessary to synchronize the htaccess file using the options of your hosting.

Leave a Reply

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