Your Internet Ally

Redirect https
From January of 2017, browsers infrom their visitors whether the website is secure or not. This results in the installation of several SSL certificates. With this installation, some adjustments will have to be done in order to make the website this redirection to https permanently.

Most CMSs, like WordPress and Magento, have the option in their settings in order to place the address as you want it to be displayed regardless of what is typed by visitors. Other CMSs, such as Joomla, and custom websites do not have this option, and this process must be done by .htaccess file. But what this file is? This is a web server configuration file, through which you can do various settings regardless your hosting service.

In order to make the settings we want, we must first check that the .htaccess file exists. Usually this file is founded in the form of htaccess.txt, what we should do is to rename it to .htaccess. If is does not exist, we create it by making the necessary settings in our CMS in order to enable rewrites and then we do the settings we want. Below we will see some actions we can do through the .htaccess file.

  Initially, there should be the "RewriteEngine On", which usually exists.
  When we installing an SSl certificate, we have to enter the following rules in order to automatically redirect our website from http to https:
  • If you want to see only https.
    RewriteCond %{HTTPS} off
    RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

  • If you want https and www to appear.
  • RewriteCond %{HTTP_HOST} !^www\.
    RewriteRule ^(.*)$ https://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
  If you want to display only the www without https.
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
Some examples in order to make more understandable what we say above, are for the first case when someone typing to redirect it automatically to
For the second case, what happens is when someone typing to redirect it to
The last case involves redirecting from a domain without "www" to the same domain name with "www", specifically from to

You can choose any option from the above and set it on your website.
Choose a hosting service from!