View Categories

How to force https with .htaccess file

< 1 min read

Force all traffic to use HTTPS #

To force all traffic on your domain to use HTTPS, simply add the following. If you have existing code in your .htaccess file, you should add this above your current rewrite rules.

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