After installing SSL the site opens over HTTPS, but the HTTP version is still accessible. Search engines may index both — bad for SEO. You need forced redirect.
Option 1: cPanel toggle
- cPanel → Domains
- Find your domain in the list
- Enable Force HTTPS Redirect
Done. cPanel writes the rule into .htaccess.
Option 2: manually via .htaccess
Open public_html/.htaccess and add at the top:
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
For WordPress
Additionally in the admin: Settings → General change "WordPress Address" and "Site Address" from http to https. Otherwise you'll get mixed content.
Verification
- Open
http://yourdomain.tj— should redirect - Check via
curl -I http://yourdomain.tj— status 301 and Location with https - Check internal links — no http://yourdomain.tj in the code (mixed content)