How to force redirection to HTTPS

To force visitors to use HTTPS to access your site via your SSL certificate is to add the following to the top of a .htaccess file:

RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
  • force https, https, https redirection, htaccess, rewriteengine
  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

We don't enjoy suspending accounts

We only suspend accounts when absolutely necessary.If you are seeing a message that says your...

Firewall block - I can't connect to my website or email

If you find that you are unable to: open your website - it just times out or takes too long to...

Powered by WHMCompleteSolution