How to redirect http:// to https:// via .htaccess file.

This article helps you to redirect your nonsecure http:// site to https:// with easy few steps.

Where should the .htaccess file be created?

The .htaccess file should be located in your website's primary directory. If your site is '', the .htaccess file would go in the /home/username/public_html directory. You can also confirm your site's web directory in the panel. 

  1. Go to settings and enable show hidden files.
  2. Now your .htaccess file should appear If not create one by adding a new file.
  3. Copy and paste the owing code to your .htaccess file and hit save.
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301,NE]
Header always set Content-Security-Policy "upgrade-insecure-requests;

If this isn't working for you please consider contacting support or create a ticket from your panel.