Force HTTPS on your website

Try placing the following code up the top of your .htaccess file that resides in the root directory of your website:

# Force redirect to HTTPS
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
</IfModule>

# Upgrade non-secure elements to HTTPS
<ifModule mod_headers.c>
Header always set Content-Security-Policy "upgrade-insecure-requests;"
</IfModule>

You can edit your .htaccess file via an FTP program such as FileZilla or through the File Manager in cPanel.

  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

How to access your cPanel

You have two ways to access your cPanel:Access cPanel via your client area1.) Log into your...

Disk space quotas

Everything within your cPanel account adds towards your total disk usage. This includes your...

What are the Razz Hosting cPanel web hosting nameservers?

The nameservers for Razz Hosting cPanel web hosting services are:ns1.razz.net.auns2.razz.net.au

Installatron backup locations

The cPanel servers internal storage is a disabled backup location for Installatron as the storage...

What is LSCache?

LSCache is a server-side page cache built into the LiteSpeed Web Server. Page caches save time...