How to Redirect HTTP to HTTPS

Even if your SSL certificate is installed, visitors who open your site with http:// get an unencrypted connection, and the browser shows a "Not secure" warning. You should redirect all visitors to https:// automatically.

Redirecting in Plesk

  1. On the Websites & Domains page, click Hosting Settings under your domain.
  2. Select Permanent SEO-safe 301 redirect from HTTP to HTTPS.
  3. Click OK.

You can also do this with the Redirect from HTTP to HTTPS switch on the SSL/TLS Certificates page.

Redirecting in cPanel

  1. Go to Domains in cPanel.
  2. Turn on the Force HTTPS Redirect switch next to your domain.

Redirecting with .htaccess

If there is no panel option, add these lines at the top of the .htaccess file in your site's root folder:

RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [L,R=301]

Extra steps for WordPress

  • On Settings > General, update WordPress Address and Site Address to start with https://.
  • If pages still load images over http://, the browser does not show the padlock (mixed content). You can replace old addresses in the database with a plugin such as Better Search Replace.

Redirect loop warning

If you get an "ERR_TOO_MANY_REDIRECTS" error, you may have turned on the redirect in more than one place at the same time (panel, .htaccess and a plugin). Use only one.

  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

What is SSL?

🔐 SSL (Secure Sockets Layer) is an encryption protocol that secures data exchange on the...

What is a CSR?

📄 CSR (Certificate Signing Request) is a special file created to obtain an SSL certificate. It is...

Why Is There No Padlock Icon?

🔒 If there is no padlock in the address bar, it usually means the site's SSL (HTTPS) connection...

What is a CAA Record?

📛 CAA (Certification Authority Authorization) record is a DNS-based security mechanism that...

What Are the Benefits of a CAA Record?

A CAA record is a smart measure that improves domain security at the DNS level. It is used...