How to make website open with https?

To force the HTTPS connection on a website you can create a file .htaccess (with dot) in your main root directory and use following code inside the file

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

This works on Apache and LiteSpeed servers. The .htaccess files tells the server to open your website with https extension which will make the ssl lockpad visible on your website. The SSL certificate must be installed on your server first in order for this to work properly. Check if your website has SSL certificate properly installed using this website

https://www.sslshopper.com/ssl-checker.html

Spread the love
0 0 vote
Article Rating
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments