Skip to content

SSL Certificate Not Trusted

DownBad checked your site’s certificate and couldn’t confirm who vouches for it. Your site may still load in your browser, which is what makes this one confusing. This page finds the broken link in the chain, fixes it, and gets the incident closed.

An incident is open for a URL or SSL monitor, and its reason starts with SSL certificate error:. For example:

SSL certificate error: unable to verify the first certificate

Some words you’ll need. Every HTTPS site sends a certificate, a small file that proves the site is the one it claims to be. A certificate is believed only when someone trusted has signed it: a certificate authority (a company such as Let’s Encrypt or DigiCert that issues certificates). The authority’s master certificate is its root. Roots don’t sign your certificate directly. They sign an intermediate certificate, and the intermediate signs yours. The list from your certificate up to a root is the chain, and your server is meant to send it all, except the root itself. Every program that checks certificates keeps a list of roots it trusts, its trust store, and rejects a certificate whose chain it can’t follow to one of them. DownBad’s checks use the trust store that ships with Node.js, the software they run on, which is a copy of Mozilla’s list.

On an SSL monitor, the reason has Operation failed after 4 attempts. Last error: in the middle, and the number of attempts can differ. The end of the reason names the fault:

The reason ends withWhat it meansStart with
unable to verify the first certificateYour server didn’t send the certificate that signed yoursThe intermediate isn’t sent
self-signed certificateYour certificate signed itselfSelf-signed
self-signed certificate in certificate chainThe chain ends at a root that DownBad doesn’t trustA private authority, then a root too new
unable to get local issuer certificateThe chain stops at a certificate whose signer DownBad doesn’t knowA private authority, then a root too new
anything else, such as certificate is not yet validAnother fault in the certificate itselfAnother certificate fault

Start without a terminal. Enter your domain in SSL Labs’ SSL Server Test and wait a minute or two for the report. In its certificate section, look at Chain issues and Trusted. If Chain issues says Incomplete or Trusted says No, your server sends a chain that DownBad, and every program that checks certificates the way it does, rejects. How to read the rest of the report is at the end of Check it yourself.

A certificate looks the same to everyone who checks it, so this isn’t a network problem between DownBad and your site. The fault is in how your server is set up, and the fixes below happen there. The one exception is a root too new for many clients, where DownBad’s trust store is part of the story.

Your browser isn’t a fair test. When your server leaves out the intermediate, most browsers download it from an address written inside your certificate, and Firefox carries a list of intermediates with it. Browsers also remember intermediates they have seen on other sites. So the site loads in every browser you try. DownBad doesn’t fill in missing certificates, and neither do many other programs that talk to your site: apps, other companies’ servers calling your API, payment and webhook senders, command-line tools. For all of them, your site is broken the way DownBad says.

This command asks your server for its certificates, as DownBad’s check does, without filling in anything that’s missing. It prints the certificates the server sent and whether your computer could trust them. Put your domain in place of both example.coms. If your monitor checks a port other than 443, change 443 too.

The examples below are what it printed for badssl.com, a test site whose chain is complete, and incomplete-chain.badssl.com, a test site that leaves out its intermediate on purpose. Try the command on both first to see the two answers on your own computer.

If even badssl.com shows 20 (unable to get local issuer certificate), your copy of openssl has no list of trusted roots, so its verdicts mean nothing: read only the certificate list, or use the check without a terminal.

Terminal window
OPENSSL_X509_TEA_DISABLE=1 openssl s_client -connect example.com:443 -servername example.com -showcerts </dev/null 2>/dev/null | grep -E '^ *[0-9]+ s:|^ +i:|Verify return code'

The command starts with OPENSSL_X509_TEA_DISABLE=1 because the Mac’s own openssl otherwise asks macOS to fill in a missing intermediate, just as a browser does, and reports success for a chain DownBad rejects.

If it works
0 s:/CN=*.badssl.com
i:/C=US/O=Let's Encrypt/CN=YR2
1 s:/C=US/O=Let's Encrypt/CN=YR2
i:/C=US/O=ISRG/CN=Root YR
2 s:/C=US/O=ISRG/CN=Root YR
i:/C=US/O=Internet Security Research Group/CN=ISRG Root X1
Verify return code: 0 (ok)
If the intermediate is missing
0 s:/CN=*.badssl.com
i:/C=US/O=Let's Encrypt/CN=YR2
Verify return code: 21 (unable to verify the first certificate)

How to read it:

  • Each certificate the server sent has two lines. s: (the subject) is who the certificate belongs to, and i: (the issuer) is who signed it. Certificate 0 is yours.
  • In a good chain, each certificate’s i: line names the next certificate’s s:, and the last i: names a root that has been trusted for years, such as ISRG Root X1 or ISRG Root X2 for Let’s Encrypt.
  • Verify return code is your computer’s verdict. The words after the number are the same words DownBad’s reason ends with.
What you seeGo to
Only certificate 0, and 21 (unable to verify the first certificate)The intermediate isn’t sent
Certificate 0 has the same name on its s: and i: lines, and 18 (self-signed certificate)Self-signed
The last i: names your own organisation or a product rather than a public authority, and code 19 or 20A private authority
The last i: names a recent root such as Root YE or Root YRA root too new
10 (certificate has expired), while your own certificate is currentAn expired certificate in the chain
A second certificate for your own site, or a certificate whose s: isn’t the i: of the one above itLeftover certificates
A good chain and 0 (ok)Your chain is fine now. Make sure you checked the host and port the monitor checks, then confirm DownBad sees the fix

Without a terminal: enter your domain in SSL Labs’ SSL Server Test and wait a minute or two for the report. Tick Do not show the results on the boards if you’d rather your result wasn’t listed. In the certificate section:

  • Chain issues should say None. Incomplete means your server doesn’t send the intermediate. SSL Labs downloads it anyway, as a browser does, so Trusted can still say Yes; under Certification Paths the missing certificate is marked Extra download.
  • Extra certs under Chain issues means the server sends certificates that don’t belong in the chain.
  • Trusted saying No and NOT TRUSTED means the certificate is self-signed or its authority isn’t a public one. Certification Paths marks the certificate at fault Self-signed or Not in trust store.

The causes below run from most to least likely, so start with the first. Several can happen at once: an old chain file often leaves out the intermediate and sends leftovers.

This is the cause when the reason ends with unable to verify the first certificate and Check it yourself lists only certificate 0, or SSL Labs says Chain issues Incomplete. It is the most common cause, and the most confusing, because the site still works in a browser: browsers download or remember the missing intermediate, and DownBad doesn’t, unless the monitor is set to pass what browsers accept.

Your server has to send your certificate and the intermediate that signed it, in one list. Most certificate tools save both files, and the fix is to point the server at the one that holds both. If the list also shows certificates that don’t belong, an old chain file is behind it: remove it in the same change, as leftover certificates describes.

  1. Find where your web server is told which certificate to send. On nginx, it’s the ssl_certificate line in your site’s server block, usually under /etc/nginx/sites-enabled/ or /etc/nginx/conf.d/. On Apache, it’s the SSLCertificateFile line, and sometimes an SSLCertificateChainFile line, in your site’s <VirtualHost *:443> block, usually under /etc/apache2/sites-enabled/ or /etc/httpd/conf.d/.

  2. Point it at the file that holds your certificate followed by the intermediate. With certbot (Let’s Encrypt’s usual tool), that’s fullchain.pem, not cert.pem, which holds your certificate alone (certbot’s guide to its files).

    • nginx:
      ssl_certificate /etc/letsencrypt/live/example.com/fullchain.pem;
      ssl_certificate_key /etc/letsencrypt/live/example.com/privkey.pem;
      (nginx’s guide to certificate chains)
    • Apache 2.4.8 or later: point SSLCertificateFile at fullchain.pem and delete any SSLCertificateChainFile line, which Apache no longer needs.
      SSLCertificateFile /etc/letsencrypt/live/example.com/fullchain.pem
      SSLCertificateKeyFile /etc/letsencrypt/live/example.com/privkey.pem
      (Apache’s guide to SSLCertificateFile)
    • A certificate you bought: the authority gives you a file of intermediates, often called a CA bundle. For nginx, make one file with your certificate first and the bundle after it. In a hosting control panel, paste the bundle into the field for the CA bundle or chain.
  3. Reload the server so it sends the new chain. This changes your running server and needs sudo. Each command below checks the configuration first. If there’s a mistake, it prints it and leaves the server running as it was. When it works, nginx prints nothing. Apache prints nothing, or only a warning that starts with AH00558 and says it Could not reliably determine the server's fully qualified domain name. That warning is harmless: it means only that the configuration doesn’t set a ServerName. The examples of a mistake come from a test server, so your paths will differ.

    • nginx (nginx’s guide to reloading):

      Terminal window
      sudo nginx -s reload
      If the chain file has your certificate after the bundle
      nginx: [emerg] SSL_CTX_use_PrivateKey("/tmp/lab/letsencrypt/live/example.com/privkey.pem") failed (SSL: error:05800074:x509 certificate routines::key values mismatch)
    • Apache (Apache’s guide to apachectl):

      Terminal window
      sudo apachectl graceful
      If the configuration names a file that isn't there
      AH00526: Syntax error on line 13 of /tmp/lab/httpd.conf:
      SSLCertificateFile: file '/tmp/lab/letsencrypt/live/example.com/fulchain.pem' does not exist or is empty
  4. If more than one server answers for your site, such as several behind a load balancer, fix each of them.

  5. Run Check it yourself again. Certificate 1 should now appear, its s: matching certificate 0’s i:, and the code should be 0 (ok).

This is the cause when the reason ends with self-signed certificate and, in Check it yourself, certificate 0 has the same name on its s: and i: lines with 18 (self-signed certificate). SSL Labs says Trusted No and marks the certificate Self-signed.

A self-signed certificate vouches for itself: no authority has signed it, so nothing trusts it. Servers often send one by accident when a request reaches their placeholder site, such as Ubuntu’s ssl-cert-snakeoil.pem, because your site’s name isn’t set up for HTTPS there.

  1. If you already have a real certificate for this name, the request is reaching the wrong site on your server. Check that the site with the real certificate lists this exact name (server_name on nginx, ServerName or ServerAlias on Apache) and listens for HTTPS on port 443.

  2. Otherwise, get a free certificate from Let’s Encrypt. Many hosting providers do it for you with a switch in their control panel (Let’s Encrypt’s getting started guide). On your own server, certbot’s instructions give the steps for your web server and system.

  3. If the certificate is self-signed on purpose, for an internal service, know what DownBad can do with it:

    • DownBad can’t be told to trust your certificate. A URL monitor always checks the certificate of an https:// address, so it fails every time.
    • An SSL monitor can still warn you before the certificate expires: turn off Validate Certificate Chain in the monitor’s settings. It then stops checking who signed the certificate and which names it covers, and checks only its dates. Don’t turn it off to hide any other cause on this page.
    • A port monitor on port 443 checks that the service accepts connections.
    • DownBad doesn’t check private addresses, such as 10.0.0.5, 192.168.1.10 or localhost, so a service reachable only inside your network can’t be monitored from DownBad at all.

The certificate is from a private authority

Section titled “The certificate is from a private authority”

This is the cause when the reason ends with self-signed certificate in certificate chain or unable to get local issuer certificate, and the last i: line in Check it yourself names your own organisation or a product rather than a public authority, with code 19 or 20. SSL Labs says Trusted No and marks the authority Not in trust store.

A private authority is one an organisation runs for itself. Only computers that someone has set up to trust it believe its certificates, which is why the site may work on a work laptop and fail for DownBad.

  1. If your site is behind Cloudflare, check whether the certificate on your server is a Cloudflare origin certificate. Only Cloudflare trusts those. If the monitor checks a name whose DNS record isn’t proxied through Cloudflare (marked DNS only), or your server’s own address, DownBad reaches your server directly and sees that certificate (Cloudflare’s guide to origin certificates). Point the monitor at the name your visitors use, or put a public certificate on the server.

  2. Otherwise, replace the certificate with one from a public authority, such as a free one from Let’s Encrypt (Let’s Encrypt’s getting started guide, certbot’s instructions).

  3. If the private authority is on purpose, know what DownBad can do with it:

    • DownBad can’t be told to trust your authority. A URL monitor always checks the certificate of an https:// address, so it fails every time.
    • An SSL monitor can still warn you before the certificate expires: turn off Validate Certificate Chain in the monitor’s settings. It then stops checking who signed the certificate and which names it covers, and checks only its dates.
    • A port monitor on port 443 checks that the service accepts connections.
    • DownBad doesn’t check private addresses, such as 10.0.0.5, 192.168.1.10 or localhost, so a service reachable only inside your network can’t be monitored from DownBad at all.

This is the cause when the reason ends with unable to get local issuer certificate (or self-signed certificate in certificate chain, if your server sends the new root itself), and the last i: line in Check it yourself names a recent root, such as Root YE or Root YR, Let’s Encrypt’s roots from 2025. Your own computer may say 0 (ok) if it already trusts that root.

Authorities make new roots from time to time, and a new root takes years to reach every trust store. Meanwhile, the authority publishes a copy of the new root signed by its older root, called a cross-signed copy. When your server sends that copy after the intermediate, every program that trusts the older root can follow the chain. The trust store DownBad’s checks use doesn’t include Let’s Encrypt’s 2025 roots yet, and many other programs lack them too, so the fix belongs in your chain.

A URL monitor set to pass what browsers accept also trusts the roots in Mozilla’s list, the one Firefox uses, but that helps only with a root already in that list. Root YE and Root YR aren’t in it yet, so for them, changing the setting doesn’t make the monitor pass: send the cross-signed copy, as in the steps below. For a newer root that is in Mozilla’s list, the setting makes the monitor pass, but your other clients still fail.

The cross-signed copy is missing
0 s:CN = example.com
i:C = US, O = Let's Encrypt, CN = YE1
1 s:C = US, O = Let's Encrypt, CN = YE1
i:C = US, O = ISRG, CN = Root YE
Verify return code: 20 (unable to get local issuer certificate)
The cross-signed copy is sent
0 s:CN = example.com
i:C = US, O = Let's Encrypt, CN = YE1
1 s:C = US, O = Let's Encrypt, CN = YE1
i:C = US, O = ISRG, CN = Root YE
2 s:C = US, O = ISRG, CN = Root YE
i:C = US, O = Internet Security Research Group, CN = ISRG Root X2
Verify return code: 0 (ok)
  1. With Let’s Encrypt, the chain it hands out by default already ends with the cross-signed copy (Let’s Encrypt’s chains of trust). Point your server at certbot’s fullchain.pem, as in the first cause. If you told certbot to prefer a shorter chain with its --preferred-chain option, change that setting and renew (certbot’s guide to changing a certificate’s renewal settings).

  2. If you put the chain file together by hand, add the cross-signed copy after the intermediate. Let’s Encrypt publishes it on its chains of trust page: for the YE1 and YE2 intermediates, Root YE cross-signed by ISRG Root X2; for YR1 and YR2, Root YR cross-signed by ISRG Root X1. For another authority, ask it for its cross-signed chain.

  3. Reload the server, as in the first cause. This needs sudo.

  4. Run Check it yourself again. The last i: line should now name an older root, such as ISRG Root X1 or ISRG Root X2.

This is the cause when a certificate after yours in the chain has passed its end date. The reason may say certificate has expired even though your own certificate is current, and Check it yourself shows 10 (certificate has expired). SSL Labs lists every certificate your server sends with the date it expires.

It usually means the server sends an intermediate from an old chain file, such as R3 or Let's Encrypt Authority X3, which Let’s Encrypt has retired.

  1. Find the lines in your web server’s configuration that name certificate files, as in the first cause. The certificates Check it yourself listed after certificate 0 came from the file they name.

  2. Point the server at the chain file your certificate tool keeps up to date, such as certbot’s fullchain.pem, or download the current intermediates from your authority. Remove the line naming the old file.

  3. Reload the server, as in the first cause. This needs sudo.

  4. Run Check it yourself again. The code should be 0 (ok).

This is the cause when the reason ends with a fault not named above, such as:

  • certificate is not yet valid: the certificate’s start date is still in the future. The certificate was made for a later date, or on a machine whose clock was wrong.
  • unsuitable certificate purpose: the certificate wasn’t made for a website.
  • certificate signature failure: the certificate is damaged or has been altered.
  1. Look at the certificate’s dates and details in SSL Labs, or on your server in the certificate file your web server names.

  2. Get a new certificate from your authority, install it as in the first cause, and reload the server.

  3. Run Check it yourself again. The code should be 0 (ok).

Leftover certificates from an old chain file

Section titled “Leftover certificates from an old chain file”

This applies when Check it yourself shows a second certificate for your own site, or a certificate whose s: isn’t the i: of the one above it, often a retired intermediate such as Let's Encrypt Authority X3 or R3. SSL Labs says Chain issues Extra certs.

Leftovers on their own never make the check fail, so they are never the whole story: one of the causes above failed it, usually the intermediate not being sent. What leftovers tell you is where that went wrong: a chain file nobody has updated since an older certificate. Remove it in the same change, or it lays the same trap for the next renewal.

For example, one Apache server sent its current certificate, which renews automatically, then an expired certificate for the same site from 2020 and the retired intermediate that had signed it. It never sent the intermediate that signed the current certificate, because SSLCertificateChainFile still named a chain file from 2020. Check it yourself shows that kind of chain like this (as Linux prints it):

Leftovers, and the current intermediate missing
0 s:CN = example.com
i:C = US, O = Let's Encrypt, CN = YE1
1 s:CN = example.com
i:C = US, O = Let's Encrypt, CN = Let's Encrypt Authority X3
2 s:C = US, O = Let's Encrypt, CN = Let's Encrypt Authority X3
i:O = Digital Signature Trust Co., CN = DST Root CA X3
Verify return code: 21 (unable to verify the first certificate)
  1. Find the lines that name certificate files in your web server’s configuration: ssl_certificate on nginx, and SSLCertificateFile and SSLCertificateChainFile on Apache. They’re usually under /etc/nginx/, /etc/apache2/ or /etc/httpd/.

  2. Work out which of those files is left over. It’s any file other than the chain file your certificate tool keeps up to date: with certbot, anything other than fullchain.pem in /etc/letsencrypt/live/example.com/, such as an SSLCertificateChainFile line naming a file elsewhere. You don’t need to open it to see what’s inside: the certificates Check it yourself listed after certificate 0 came from it.

  3. Point the server at the file your certificate tool keeps up to date. With certbot, that’s fullchain.pem in /etc/letsencrypt/live/example.com/. Certbot’s own guide says to point your server at these files rather than copy them, because renewing updates them (certbot’s guide to its files).

    Don’t paste the new intermediate into the old file by hand. The next renewal would leave that file behind again.

  4. Reload the server, as in the first cause. This needs sudo.

  5. Run Check it yourself again. It should list your current certificate and then its intermediates, each s: matching the i: above it, with no other certificate for your site.

Let a URL monitor pass what browsers accept

Section titled “Let a URL monitor pass what browsers accept”

This isn’t a fix: it changes what one monitor accepts, not what your server sends. Use it when a browser is the only thing that visits the site, or while you wait for whoever runs the server to fix the chain.

A new URL monitor’s Certificate Chain setting starts on Browser-compatible. Older URL monitors keep the setting they had, which is Strict unless someone changed it. On Browser-compatible, the monitor also passes a chain a current browser accepts:

  • A missing intermediate, when your certificate names the address it can be downloaded from. Most certificates do, in a field called Authority Information Access, and browsers download it from there. The monitor does the same.
  • A root browsers trust that DownBad’s own list doesn’t have yet. The monitor also trusts the roots in Mozilla’s list, the one Firefox uses. Let’s Encrypt’s Root YE and Root YR aren’t in it yet, so a chain ending at either still fails until your server sends the cross-signed copy.

It still fails everything a browser warns about: an expired certificate, a certificate for a different host name, a self-signed certificate, and a certificate from a private authority, such as one your company runs. A downloaded certificate is only ever a link in the chain: the chain still has to end at a root in one of the two lists. SSL monitors have no such setting and always check strictly.

Choose Strict when browsers aren’t your only visitors. Mobile apps, API clients, scripts, webhooks from other services and older devices usually check strictly: they don’t download a missing intermediate, and their lists of roots lag behind. A chain that passes only as Browser-compatible fails for them, and Strict tells you so before they do.

  1. Open the monitor from Monitors in DownBad’s sidebar, and select Edit on its Configuration card.

  2. Under Certificate Chain, choose Browser-compatible, and save. The next check uses it, and so do the re-checks from other regions that confirm a failure.

  3. If the monitor now passes because of the setting, its Overview shows a notice naming what was wrong with the chain, with a link to the cause above that fixes it. The notice isn’t an incident and sends no alert. It goes away once a check finds nothing to work around.

  4. Once the chain is fixed, set Certificate Chain back to Strict, so the monitor catches the next fault before your other clients do.

  1. Fix the cause first. A check that still fails while you work only adds to the time the incident takes to close.

  2. Open the incident and press Test Now. DownBad checks again within a few seconds instead of waiting for the next scheduled check.

  3. Wait a minute, then reload the incident page, which doesn’t update by itself. The incident closes by itself once enough checks in a row pass. You can’t close an incident by hand.

How many passing checks it takes. While an incident is open, DownBad checks less often after repeated failures. This is called back-off. Each failed check adds one step of back-off, up to 14. Each passing check takes one step away and asks for the next check straight away. When no steps are left, one more passing check closes the incident. So after a steady outage it takes one more passing check than there were failed checks while the incident was open, counting the one that opened it, and never more than 15.

These are the defaults. The monitor’s notification profile can change them for each monitor type under Backoff Config, and its settings are the ones that count: Recovery is how many passing checks in a row, with no back-off left, close the incident (2 by default, counting the check that takes the last step away), and Start after, Rate and Max interval decide when back-off starts and how far it goes. If the profile changes them, the step counts above and the waits below change with them.

How long that takes. After you press Test Now, those passing checks run back to back, a few seconds apart, so the incident usually closes within a minute. It takes longer when checks are slow to finish, such as a page that takes several seconds to load.

If you don’t press Test Now, the first passing check waits for the next scheduled one. With the default settings, from the third failed check on, DownBad waits 5 more minutes for each failure, up to an hour more than the monitor’s usual interval:

Monitor checks everyAfter 1 or 2 failed checksAfter 3After 6After 14 or more
1 minute1 minute6 minutes21 minutes61 minutes
5 minutes5 minutes10 minutes25 minutes65 minutes
1 hour1 hour1 hour 5 minutes1 hour 20 minutes2 hours
1 day1 day1 day 5 minutes1 day 20 minutes1 day 1 hour

Before you ask for help, collect:

  • the link to the incident, and the reason it shows, word for word
  • the output of the command in Check it yourself, and when you ran it
  • the link to your SSL Labs report
  • the lines in your web server’s configuration that name certificate files

Never send your private key (privkey.pem, or any file ending in .key). Nobody needs it to help you, and anyone who has it can pretend to be your site.

Then send all of it to us through Contact Us.