Before proceeding, ensure you have a valid and active SSL certificate installed on your hosting package. Below are two methods to load your website as https://
, which will display a secure padlock icon in your URL. If you have a WordPress site, follow Method 1 first, then Method 2.
Method 1:
-
Log in to cPanel.
-
Select File Manager.
-
Click Settings and ensure that Show Hidden Files (dotfiles) is checked; if not, check it and click Save.
-
Navigate to the website’s
public_html
directory. -
Edit the existing
.htaccess
file by right-clicking it, or create a new.htaccess
file and then right-click to edit. -
Add the following text:
RewriteEngine On RewriteCond %{HTTPS} !=on RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
-
Click Save Changes (top right).
Your website should now load as https://
by default. If you don’t see this change, please clear your browser cache.
Method 2:
If you have a WordPress site and have enabled the .htaccess
rule as described in Method 1, you may still notice that the secure padlock icon is not displaying. This issue occurs because WordPress often loads uploads, such as images, as http://
instead of https://
.
To resolve this, consider using WordPress plugins like Really Simple SSL that can help enforce secure connections throughout your site.