Operating System Linux

How to Install an SSL Certificate in cPanel (SSL/TLS Interface and AutoSSL)

Two ways to get HTTPS on a cPanel site: run AutoSSL from SSL/TLS Status, or upload a private key and certificate and install them under Manage SSL sites.

cPanel offers two ways to put a TLS certificate (still commonly called an SSL certificate) on a website. AutoSSL issues and renews free domain-validated certificates without any work from you, and the SSL/TLS interface lets you install a certificate you obtained from a certificate authority yourself. This guide covers both for current cPanel & WHM releases, using the interface and button names from cPanel's own documentation. Hosting providers can rename, restyle or disable features, so your account may look slightly different.

Requirements

  • A cPanel account and its login. cPanel is normally reached over HTTPS on port 2083, for example https://example.com:2083, or through a link in your hosting control panel.
  • The domain already added to the account, with DNS pointing to the server.
  • For a certificate of your own: the certificate file from the certificate authority, the matching private key, and usually the authority's intermediate certificates (the CA bundle).

Option 1: Use the free AutoSSL certificate

On most cPanel servers AutoSSL is switched on by the hosting provider, and your domains receive a certificate automatically. It installs domain-validated certificates on the account's domains and replaces them before they expire. By default the system uses the Let's Encrypt provider.

  1. Log in to cPanel and open SSL/TLS Status in the Security section.
  2. Look at the domain list. An icon beside each domain shows what secures it: unsecured, self-signed, an AutoSSL DV certificate, or a DV, OV or EV certificate. The Certificate Status column shows the certificate details, when AutoSSL last ran for the domain, and any error from that run.
  3. If a domain is unsecured or was added recently, click Run AutoSSL and wait for the run to finish, then reload the list.

AutoSSL only includes domains that pass a domain control validation (DCV) test, so it fails for a domain whose DNS does not yet point to the server. Two other common causes of failure are CAA records in the DNS zone that do not allow the certificate authority AutoSSL uses (edit them in Zone Editor in the Domains section) and a suspended account.

If SSL/TLS Status is missing, the provider has disabled the feature for your package; ask them, or install your own certificate as described next.

Option 2: Install your own certificate

Use this route for a certificate you bought, such as an OV or EV certificate, or one issued elsewhere. Everything happens in the SSL/TLS interface in the Security section. Some servers show a combined interface named SSL/TLS Certificates instead; it contains the same functions.

The interface has four areas, each opened by a link on its main page:

AreaLink on the SSL/TLS page
Private Keys (KEY)Generate, view, upload, or delete your private keys.
Certificate Signing Requests (CSR)Generate, view, or delete SSL certificate signing requests.
Certificates (CRT)Generate, view, upload, or delete SSL certificates.
Install and Manage SSL for your site (HTTPS)Manage SSL sites.

Step 1: Create a private key and a CSR (if you have not ordered the certificate yet)

A certificate authority issues a certificate in response to a certificate signing request, which is created from a private key. Creating both in cPanel keeps the key on the server, where it will be needed.

  1. Open Generate, view, upload, or delete your private keys. Under the heading for generating a new key, choose a Key Type, add a description if you like, and click Generate. Click Return to Private Keys.
  2. Open Generate, view, or delete SSL certificate signing requests. Select the key in the Key menu, enter the domain names and the organisation details the form asks for, and click Generate.
  3. Copy the CSR text and submit it to the certificate authority when you order. Complete the authority's validation and download the issued certificate and its CA bundle.

Skip this step if the certificate has already been issued.

Step 2: Upload the private key (only if it was created elsewhere)

If the key and CSR were generated outside cPanel, the server does not have the key yet. Open Generate, view, upload, or delete your private keys, then either paste the key into the text box and click Save, or click Choose File, select the .key file and click Upload. Paste the complete block, including the -----BEGIN and -----END lines.

Step 3: Upload the certificate

Open Generate, view, upload, or delete SSL certificates. Paste the certificate text and click Save Certificate, or click Choose File, select the .crt file and click Upload Certificate. The certificate then appears in the Certificates on Server table.

Step 4: Install the certificate on the site

  1. Open Manage SSL sites.
  2. Click Browse Certificates, select the certificate you uploaded and click Use Certificate. The form is filled in with the certificate and its private key.
  3. If the certificate authority gave you a CA bundle and the Certificate Authority Bundle (CABUNDLE) box is empty, paste the bundle there.
  4. Click Install Certificate.

There are two other ways to reach the same result. You can select the domain in the form and click Autofill by Domain to let cPanel find a matching certificate and key on the server, or paste the certificate, key and bundle into the three boxes by hand. The Certificates on Server table from step 3 also has an Install action that opens this form for a certificate.

Verify the installation

Open https://example.com/ in a browser and check the certificate details behind the padlock. For a check that is independent of browser caches, run this from any Linux or macOS machine:

openssl s_client -connect example.com:443 -servername example.com </dev/null 2>/dev/null | openssl x509 -noout -subject -issuer -dates

The output shows who the certificate was issued to, who issued it and when it expires. If the issuer line shows your certificate authority but browsers still complain about trust, the CA bundle is missing or wrong; install the certificate again with the correct bundle.

Installing a certificate makes the site available over HTTPS but does not move visitors there. Set up a redirect from HTTP to HTTPS separately once the HTTPS site works.

Replace, renew or remove a certificate

Manage SSL sites lists every site that has a certificate in the Manage Installed SSL Websites table. From there you can open Certificate Details, replace the certificate with Update Certificate or remove it with Uninstall.

A purchased certificate does not renew by itself. Before it expires, order the renewal from the certificate authority (generating a new CSR as in step 1 if they ask for one), upload the new certificate and use Update Certificate. AutoSSL certificates need no action. By default AutoSSL leaves a valid certificate that you installed yourself alone, so a paid certificate is not swapped for a free one unless the server administrator has changed that setting.

Frequently asked questions

Do I need a dedicated IP address for SSL?

No. Current browsers and servers use Server Name Indication, which lets many HTTPS sites with different certificates share one IP address.

What is the CA bundle and is it required?

It is the chain of intermediate certificates that links your certificate to a root that browsers already trust. The field is optional in cPanel, and the server can often work the chain out for itself, but when the chain is missing some clients reject the certificate. If your certificate authority supplied a bundle, install it.

Can I use a self-signed certificate from the Certificates page?

The interface can generate one, but browsers show a warning for it because no trusted authority vouches for it. cPanel's documentation reserves self-signed certificates for intranet use; for a public website use AutoSSL or a certificate from a certificate authority.

Why does AutoSSL keep failing for one domain?

Open SSL/TLS Status and read the message in the Certificate Status column. Most failures are validation problems: the domain or one of its subdomains resolves to another server, a redirect or access rule blocks the validation request, or a CAA record excludes the certificate authority. Fix the cause and click Run AutoSSL again.

Share story:

Continue reading other guides on How VPS.