How to force SSL with .htaccess

If you want to force your entire website to go through https, you can add these rules to your .htaccess file:

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

Was this answer helpful?

 Print this Article

Also Read

Can I edit MX, CNAME, A records of my domain?

You can change the MX records for your domain by navigating to cPanel -> MX Entry tool. If...

Can I have custom error pages?

Yes, you can set up your own custom error pages by using the .htaccess file (it is located in...

Can I run WordPress, Joomla, or any other script on my account?

Absolutely! We fully support most standard scripts and offer a library of over 300 scripts...

Do you offer SSL certificates?

We use cPanel AutoSSL to automatically install SSL certificates on all domains hosted on our...

Do you support Zend Guard or Ioncube?

We sure do! Zend Guard (formerly Zend Optimizer) as well as Ioncube are installed on all shared...