Click On Tyler Support


Contact Us

Support Home » VirtualHostX » How To's

How to Force Your Website to Use HTTPS/SSL

Last Updated December 9, 2019

To force your website to use HTTPS, create a new file in your website's top-level directory called .htaccess with the following contents...

RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

If mod_rewrite is enabled in your web server (VirtualHostX enables this for you by default), those rules will redirect visitors to your HTTPS site automatically.