How to Force HTTPS Using .htaccess in cPanel- CreemHost
After installing an SSL certificate if you see your website showing not secure or SSL not available, follow below steps to force https using .htaccess file
1. Login to cPanel and go to File Manager CreemHost cPanel URL
2. Go to your domain root folder like public_html
3. Then click on Settings in up right corner
4. Then click on Show Hidden Files (dotfiles) and save it
5. Then you will see .htaccess right click and edit it
6. Then you will see popup screen click again on Edit
7. Then add below code in top and save it
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
After saving your domain will always open with https, thanks for reading and if you have any issue please submit ticket thanks
people found this article helpful. What about you?