
If you have SSL installed on your website and want to force all connections to HTTPS, you need to include this code in your .htaccess file.
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R,L]
All traffics to your website will be forced to use HTTPS instead of normal HTTP.
And if you are using WordPress, you need to edit your WordPress Address and Website Address in Settings to your new HTTPS URL.
Don’t have SSL installed? Don’t worry. You can purchase from Elfbytes Web Hosting or any other SSL providers.
Leave a Reply