Your SSL certificate is installed, but visitors who type the old http address still land on the insecure version. Forcing HTTPS redirects everyone to the secure address automatically — one small rule in a file called .htaccess.
✅ Before you start
- Your SSL certificate must already be working — https://yourdomain.com loads with a padlock. Forcing https before that locks everyone out
- Log in to cPanel
Steps
- cPanel → File Manager → open public_html.
- Show hidden files: click Settings (top right) and tick "Show Hidden Files" — the .htaccess file appears.
- Right-click .htaccess → Edit. If the file doesn't exist, create it: + File, name it .htaccess, then Edit.
- Add these lines at the TOP of the file and save:
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] - Test: open http://yourdomain.com in a private window — it should jump to https with the padlock.
✅ Result: Every visitor, bookmark and old link now lands on the secure version of your site. Google treats this permanent (301) redirect as the official move to https.
WordPress sites: also set both addresses under WordPress Settings → General to the https version — or use a well-known SSL plugin that handles the redirect and the address change together. If the admin locks you out after changing addresses, open a ticket; it's a quick fix from our side via the database.
⚠ Common mistakes & fixes
- "Too many redirects" loop: the rule was added twice — perhaps once by you and once by a plugin. Keep exactly ONE redirect method and remove the duplicate lines.
- Rule added below WordPress's own block: it must be at the TOP of the file to run first. Move it above everything else.
- Site breaks right after editing: a typo in .htaccess can take the site down. Delete the three lines you added and save — the site returns instantly, then re-add them carefully.
Related articles
- How to Install a Free SSL Certificate (Let's Encrypt)
- How to Fix Mixed Content Warnings
- File Manager Basics: Upload, Edit & Extract Files