If you get the message in web browser that your website is "not secure" (not showing the lock icon) then try the instructions below.
UPDATE: This is now a setting in CPanel at Domains > Domains (enable "Force HTTPS Redirect")
This will redirect website users from non secure HTTP to secure HTTPS.
CPanel provides free SSL, so it is wise to ensure your visitors use it by enabling "Force HTTPS Redirect".
If this does not work try the manual htaccess method below.
-----------------------------------------------------------------------------------------------------------------------------------------------------------
To force all connections to use SSL create a blank text file (in the root folder) named .htaccess (with period at beginning) using the CPanel File Manager.
You may find the .htaccess file already exists in which case you can just add to it.
In this file paste the text below: (replace www.example.com with your domain)
RewriteEngine On RewriteCond %{SERVER_PORT} 80 RewriteRule ^(.*)$ https://www.example.com/$1 [R,L]
Port 80 is the port used for all web traffic for web pages.
Files starting with a period are "invisible" files.
You may need to set the CPanel File Manager to show invisible files in the Settings button (top right).
Other Examples:
The code can be modified to pertain to a specific domain only:
RewriteEngine On RewriteCond %{HTTP_HOST} ^example\.com [NC] RewriteCond %{SERVER_PORT} 80 RewriteRule ^(.*)$ https://www.example.com/$1 [R,L]
Replace www.example.com with your info.
... or a specific folder only:
RewriteEngine On RewriteCond %{SERVER_PORT} 80 RewriteCond %{REQUEST_URI} foldername RewriteRule ^(.*)$ https://www.example.com/foldername/$1 [R,L]
Replace foldername and www.example.com/foldername with your info.