Enabling SSL and forcing HTTPS on cPanel

Print
  • 0

A valid SSL certificate is what makes your website credible and keeps connections to cPanel, webmail and the client area secure. This guide explains how to enable it and force HTTPS on Starter, Pro and Enterprise Hosting.

Understanding SSL on your hosting

Hosting plans include a free SSL certificate issued through Let's Encrypt and AutoSSL. The certificate covers the main domain and the subdomains recognised by DNS. It is renewed automatically as long as the domain points to the hosting and the HTTP validation stays reachable.

Checking the certificate in cPanel

Open SSL/TLS Status: the list shows the domains and the certificate expiry date. If a domain shows an error, click Run AutoSSL to restart validation. Also check that the domain's A record points to your hosting: AutoSSL fails when DNS has not propagated yet.

Forcing HTTPS from the interface

In Domains, enable Force HTTPS Redirect: cPanel creates a permanent redirect from HTTP to HTTPS. The change applies immediately on the server side; a browser still holding an old cached version may show the HTTP page, so clear its cache to verify.

Redirecting with the .htaccess file

If the option is not available, add these rules to the .htaccess file of public_html:

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

Keep the existing rules and test the website after saving. If a blank page appears, remove the lines you added.

Fixing common errors

  • Mixed content: resources loaded over http:// block the padlock. Update the URLs of scripts, stylesheets and images.
  • Invalid certificate: DNS has not switched yet, or a third-party proxy intercepts traffic before your hosting.
  • Redirect loop: two conflicting rules, for example one in .htaccess and another in the application. Keep a single redirect.

When to choose a paid certificate

AutoSSL suits most websites. A paid certificate becomes useful to group several domains in one certificate (multi-domain), cover every subdomain (Wildcard) or display the company name in the certificate (OV or EV). The support team can check compatibility with your plan.

See also


Was this answer helpful?

« Back