Forcing SSL Connections Using .htaccess
If you want to make sure every website visitor is using a secure (SSL) connection, you can use htaccess rules to redirect insecure traffic. This will redirect http://mysite.com to https://mysite.com. Of course, this will only work if you have an up-to-date SSL installed for your domain.
This article assumes you are familiar with htaccess files and editing configuration files via htaccess command line or your server’s file manager. If you are not comfortable making changes to htaccess files, don’t hesitate to contact the Support team. Before making any changes to configuration files, we strongly recommend you take a backup of the file.
To redirect every website visitor to a secure connection, add this rule to the htaccess file for the website you’d like the redirect:
# force SSL on entire site
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^/?(.*) https://mysite.com/$1 [R=301,L]If you are using a content management system (CMS) like WordPress, this particular htaccess rule might not work correctly. This can cause a redirect error or for the rule to be ignored completely.