1 – Login to your cPanel
2 – Navigate to File Manager
3 – Click on Settings button
4 – Tick “Show Hidden Files (dotline)” box and press Save button
5 – Navigate to the .htaccess file you want to edit, right click, and press edit
The below code when added to an htaccess file will automatically redirect any traffic destined for http: to https:
RewriteEngine On RewriteCond %{HTTPS} off RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R,L]