Enable a Let's Encrypt certificate and force HTTPS
Secure your site on Plesk with a free Let's Encrypt certificate, redirect HTTP to HTTPS and fix common validation errors.
On this page
Your values
Enter them once and the commands in this guide update.
A certificate encrypts the traffic between your visitors and your site, and lets browsers display your address in https:// without a warning.
This guide installs a Let's Encrypt certificate with the Plesk SSL It! extension, checks HTTPS, then redirects all HTTP traffic to HTTPS.
Prerequisites
- Access to Plesk, see Connect to Plesk interface.
- The domain added to your subscription.
- The domain and its
wwwsubdomain pointing to your hosting, see Connect a domain registered elsewhere.
Let's Encrypt checks that you control the domain by contacting it from the Internet, on port 80. So check the DNS before you start:
dig +short A your-domain.com
dig +short A www.your-domain.com
dig +short AAAA your-domain.comThe first two commands must return the address of your hosting. If the third one returns an IPv6 address, it must also match your hosting, because Let's Encrypt tries IPv6 first. Otherwise, delete this AAAA record.
Install the certificate
- In Plesk, go to Websites & Domains, then open your domain.
- Click SSL/TLS Certificates.
- Under More options, click Install for the free Let's Encrypt certificate.
- Choose what the certificate must cover, using the table below.
- Click Get it free.
| Option | When to select it |
|---|---|
| Secure the main domain name | In most cases |
| Include a “www” subdomain for the domain and each selected alias | In most cases, so that www.your-domain.com is covered |
| Secure webmail on this domain | If you use webmail and webmail.your-domain.com points to your hosting |
| Assign the certificate to mail domain | If your mailboxes are hosted on Plesk and you want to secure IMAP, POP and SMTP with this certificate |
| Secure the wildcard domain (including www and webmail) | Only if you need to cover all subdomains |
Check HTTPS
Before forcing HTTPS, make sure the site works with it.
- Open
https://your-domain.comandhttps://www.your-domain.comin a private browsing window. - Check that no certificate warning appears.
- Browse a few pages. A crossed-out padlock or an incomplete page often points to images or scripts still loaded over
http://.
To view the certificate actually being served:
openssl s_client -connect your-domain.com:443 -servername your-domain.com </dev/null 2>/dev/null | openssl x509 -noout -issuer -dates -ext subjectAltNameThe issuer must mention Let's Encrypt, and the subjectAltName list must contain the names you chose.
Force HTTPS
- Go back to Websites & Domains > your domain > SSL/TLS Certificates.
- Turn on Redirect from http to https.
- If webmail does not have a valid certificate or you do not use it, clear Include webmail.
You will find an equivalent setting in Hosting & DNS > Hosting, or Hosting Settings depending on the view: Permanent SEO-safe 301 redirect from HTTP to HTTPS.
Then check the redirect:
curl -sI http://your-domain.com/ | grep -iE '^(HTTP|location)'The expected result looks like this:
HTTP/1.1 301 Moved Permanently
Location: https://your-domain.com/On WordPress, then check that the site address starts with https://, see Install WordPress and manage it with WP Toolkit.
Renewal
SSL It! automatically renews Let's Encrypt certificates 30 days before they expire. The domain must still point to your hosting at that time.
If you later add a subdomain, an alias or webmail, turn on Keep websites secured in SSL/TLS Certificates. SSL It! then reissues the certificate to cover the new names.
Advanced option: HSTS
HSTS tells browsers to refuse any unencrypted connection to your site for the Max-age period.
To enable it, open the HSTS setting in SSL/TLS Certificates, check Max-age and the available checkboxes, then click Enable HSTS. The Run SSL Labs Test button then lets you assess the configuration.
Troubleshooting
| Message or symptom | Likely cause | Solution |
|---|---|---|
DNS problem: NXDOMAIN |
A requested name does not exist in the DNS | Create the missing record or clear this name (www, webmail) |
Timeout during connect (likely firewall problem) |
Port 80 cannot be reached at the address given by the DNS | Check the A and AAAA records, then contact support if they are correct |
The authorization token is not available or 404 error on /.well-known/acme-challenge/ |
The domain points elsewhere, or a site rule intercepts the check | Check the DNS. Turn off the HTTPS redirect while the certificate is issued, then temporarily rename .htaccess |
| Validation failure on a site fully protected by a password | The check may be unable to read the verification file | Remove the protection while the certificate is issued, see Password-protect a folder |
Incorrect TXT record or no TXT on _acme-challenge |
The wildcard certificate record is missing or outdated | Fix it on all your DNS servers, remove the old values, then try again |
Refusal related to a CAA record |
The domain restricts the authorized authorities | Add 0 issue "letsencrypt.org" to the domain's CAA record |
| Message reporting too many failures or too many certificates | A Let's Encrypt limit has been reached | Fix the cause, then wait. The limit is 5 failures per hour per name, and 5 identical certificates over 7 days, subject to the current limits |
NET::ERR_CERT_COMMON_NAME_INVALID on www |
The certificate does not cover this name | Reissue it with the www option selected |
| Crossed-out padlock | Some content is still loaded over http:// |
Replace these addresses in the site or in its CMS |
ERR_TOO_MANY_REDIRECTS |
Several redirects contradict each other | Keep a single HTTPS redirect, see Redirects on Plesk |