Even with an SSL certificate installed, if a visitor opens your site with http:// the connection is not encrypted and the browser shows Not secure. That is why you should redirect all visitors to https:// automatically.
Redirect in Plesk (recommended)
- Log in to your Plesk panel at
https://yourdomain.com:8443or from the service page in your client area. - On the Websites & Domains page, click Hosting Settings under your domain.
- Tick Permanent SEO-safe 301 redirect from HTTP to HTTPS.
- Click OK.
You can also turn on the same setting with the Redirect from HTTP to HTTPS switch on the SSL/TLS Certificates page.
Redirect with .htaccess
If you cannot use the panel setting, add these lines at the top of the .htaccess file in your site's main folder:
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [L,R=301]
Extra steps for WordPress
- Under Settings > General, change WordPress Address and Site Address to start with
https://. - If pages still load images over
http://, the padlock does not appear: Why is there no padlock?
- ERR_TOO_MANY_REDIRECTS error
- The redirect may be enabled in more than one place (panel, .htaccess, plugin). Use only one.
