Force Redirect to https

View Categories

Force Redirect to https

If WordPress or other scripts are installed on HTTP or if the database has HTTP, it will load like this – http://your-domain.com can be redirected to https if you want – https://your-domain.com

In that case, follow the below procedure

cPanel > Domain > redirect HTTPS. Turn on this option.

If there is no option here, To force your site to work over SSL, you can use a rewrite rule-

cPanel > File Manager > Click on the directory or folder where your website is located > You will see the file named .htaccess > Right-click on it and click on Edit > Then save the following code anywhere:

RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301,NE]
Header always set Content-Security-Policy "upgrade-insecure-requests;"

The website will redirect from HTTP to HTTPS.

HN6

Our ethos outlines the one goal we strive for—to offer super-fast hosting alongside expert technical support, all at affordable, sustainable prices. We are here for the long term, fostering customer relationships that last a lifetime. We have already hosted more than 95000 websites for happy customers in 20 countries around the globe.

©2019-2024 Host Nil• Corp  LTD. All Rights Reserved.

Untitled design