If you buy hosting at Jayahost, SSL will automatically be active on the customer's hosting. However, website visitors can still access our website using http:// . To make it safer, we can force visitors to redirect to https:// every time a visitor visits our website.
One way is to enter the following code into our website's .htaccess:
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
How to set using Htaccess
- Login to cpanel
- Go to File Manager then go to the Public_html folder
- There is a .htaccess file there that can be edited.
additional: if you don't find the file, it might be hidden, for cpanel users to bring it up again, click "settings" on the right. then check "show hidden files"