The following snippet of code, added to your .htaccess file in your public_html folder redirects any access to a non https:// URL to a secure https:// URL preserving the rest of the URL after your domain name
This is particularly handy now that we provide free Let's Encrypt SSL certificates and your site may rank better in search engines who are increasingly favouring https:// over plain old http://.
# Redirect to https version of the url if not https RewriteCond %{HTTPS} off RewriteCond %{HTTP_HOST} ^(?:www\.)?(.*)$ [NC] RewriteRule (.*) https://www.%1%{REQUEST_URI} [L,R=301]