Automatically redirect to SSL / https website
Automatic SSL redirect
If you want to redirect visitors entering your domain name example.com automatically to https://example.com, please create a textfile on your PC called .htaccess (the leading dot is important!).
Put the following contents in that file, save it and upload it to your web root folder.
The above requires that you have activated SSL for your webhost: