Knowledgebase

How to force SSL with .htaccess

You can force an HTTPS connection on your website by adding these rules in your website's .htaccess file:

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

.htaccess file needs to be located inside the site's document root folder. If your website is in a sub folder, then the .htaccess should be placed in the corresponding sub folder.

Was this answer helpful?

 Print this Article

Also Read

How to install free SSL ?

This KB Helps you how to fix the connection not secure error on your domain (How to install Free...

Ready to rock with Kalinga Server.
Say hello to us at,
hello@kalingaserver.com
Say Hello Now
Call Support

Advance Customer service
Call On +91-89849-05-005

Enjoy a free consultation with Kalinga Server’s best web experts.

Email Now

We're ready to answer any and all questions.

Start chatting with our representative by clicking the above "Say Hello Now" Button.

Visit us

We are located in Baripada, Odisha Come and have a nice cup of tea!

MUNKA
Baripada, Odisha,
757021, INDIA