Redirect HTTP to HTTPS automatically

Using the following code in your .htaccess file automatically redirects visitors to the HTTPS version of your site:

RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

If you have an existing .htaccess file:

  • Do not duplicate RewriteEngine On.
  • Make sure the lines beginning RewriteCond and RewriteRule immediately follow the already-existing RewriteEngine On.
  • 1 Users Found This Useful
Was this answer helpful?

Related Articles

Will my services be setup immediately?

As soon as your order is placed, our system will setup your account in less than 30 seconds. You...

What is your DDoS Attack protection?

A distributed denial-ofservice (DDoS) attack occurs when multiple hosts, send traffic to a target...

How can I access my email?

You can access your email via: • Webmail: Go to http://www.yourdomainname.com/webmail from any...

Do you include protection from viruses?

Yes, all our servers are protected by Clam AV.

Can I host multiple Web sites within one Shared Hosting plan?

Yes! Our Cpanel Corporate plan allow you to host more than one Website, by adding secondary...