Knowledgebase
Silicom Network > Help Desk > Knowledgebase

Search help:


How do I automatically redirect HTTP to HTTPS?

Solution

You can easily redirect from HTTP to HTTPS automatically using htaccess.

Note: If using WordPress, there are plugins to force HTTPS that work much better, so they should be used instead.


Find the file .htaccess in the root of public_html (if one does not exist you can create one) and add the following lines:

RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301,L]
Related articles How do I force SSL or HTTPS on my WordPress website?
How do I cancel my service?
High resource usage from /wp-admin/admin-ajax.php
How do I limit login attempts or block brute force?
Article details
Article ID: 17
Category: SSL

 
« Go back