Redirect HTTPS

Redirect HTTP Website to Secure HTTPS Website Using Simple .htaccess in cPane/Hosting

Check your website if it’s already HTTPS (SSL Certificate is) valid and active by changing http:// to https:// in the URL. If you find your website is already HTTPS active, then let’s make an automatic redirect so users can land on your secured page.

Open your cPanel -> File Manager -> public_html (or very top of your folder structure), and create a file, .htaccess. Add the code to the file and save:

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

Or download this in a file, unzip, add a period before like this -> “.htaccess”, and upload in your hosting/cPanel (or very top of your folder structure).

Leave a Reply

Your email address will not be published. Required fields are marked *