1. Home
  2. Website
  3. How to setup force SSL with .htaccess
  1. Home
  2. Website Tips
  3. How to setup force SSL with .htaccess

How to setup force SSL with .htaccess

You can force an HTTPS connection on your website by adding these rules in your website’s .htaccess file:

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

Now the website will directed to https.

Was this article helpful?

Related Articles

Need Support?
Can’t find the answer you’re looking for? Don’t worry we’re here to help for 24X7!
Click here to talk us!

Leave a Comment