How to make your site always open with https

Category: Web hosting

Having an SSL certificate isn’t enough: if someone types yourdomain.com without https://, your site can open in the version without the padlock, and the browser marks it “Not secure”. To send everyone to the secure version, turn on one switch in cPanel. No file editing needed.

  1. Log in to cPanel. From the client area, on your service page click Login to cPanel.

  2. In the Domains section, open Domains.

  3. Find your domain in the list and, in the Force HTTPS Redirect column, click the switch that says Off.

    cPanel Domains list with the Force HTTPS Redirect switch highlighted

  4. Open http://yourdomain.com in a private window. It should switch to https:// on its own.

Repeat step 3 for each domain or subdomain you use. The change applies right away.

If you can’t turn the switch on, or the site shows a certificate error afterwards, the domain doesn’t have a valid certificate yet. See why your SSL certificate isn’t issued or renewed. Once the certificate is active, the switch works.

If your site is WordPress

WP Toolkit warns you when the redirect is missing: your site card shows an orange SSL/TLS label. Click it and then Turn on redirect to HTTPS; it does the same as the cPanel switch.

WP Toolkit SSL/TLS notice with the Turn on redirect to HTTPS link highlighted

Besides the redirect, WordPress needs to know its address starts with https://. Otherwise you may see “mixed content” warnings or a redirect loop. Follow the guide to switch WordPress to https.

Alternative: redirect with .htaccess

Use this method only if you need something the switch doesn’t do, such as forcing https on a single folder. If you already turned on Force HTTPS Redirect, don’t add these lines too.

  1. In cPanel open File Manager and go to public_html. If you don’t see the .htaccess file, click Settings and turn on Show Hidden Files.
  2. Download a copy of .htaccess before you touch it.
  3. Add at the top of the file:
RewriteEngine On
RewriteCond %{HTTPS} !on
RewriteCond %{REQUEST_URI} !^/\.well-known/
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

The .well-known line lets certificate validation through. Without it, AutoSSL may fail to renew.

To force https on a single folder only, put an .htaccess file with the same lines inside that folder.

If something goes wrong

  • The browser says “too many redirects”: two rules are fighting, for example the switch plus a plugin or .htaccess rules. Keep only one. In WordPress, check that the address in Settings → General starts with https://.
  • You still see the version without the padlock: clear your browser cache (how) or try a private window.
  • A 500 error appears after editing .htaccess: restore the copy you downloaded.

Would you rather we do it? Open a ticket with your domain and we’ll turn it on for you.

Still need help?

If this guide didn’t solve your issue, our team can help you via ticket.