CertiMonitor

Blog

What breaks when an SSL certificate expires

Jaime Guerrero · · 3 min read

Every certificate has its expiry date written into it the day it's issued, so an expired certificate is about the most predictable outage there is. It still happens to everyone. In February 2020 Microsoft Teams was down for hours because an authentication certificate had expired.

This is what fails, roughly in the order people notice.

The browser blocks the site

Once the expiry date passes, browsers show a full-page warning instead of your site:

BrowserError
Chrome and Edge"Your connection is not private", NET::ERR_CERT_DATE_INVALID
Firefox"Warning: Potential Security Risk Ahead", SEC_ERROR_EXPIRED_CERTIFICATE
Safari"This Connection Is Not Private"

Most visitors close the tab. If your site sends an HSTS header, and most should, the browser doesn't even offer a way past the warning. The site is unreachable until a new certificate is deployed.

APIs and integrations fail without a warning page

Programs don't show warnings. They refuse to connect. You can see it for yourself against expired.badssl.com, a test site kept with an expired certificate on purpose:

$ curl https://expired.badssl.com
curl: (60) SSL certificate problem: certificate has expired
More details here: https://curl.se/docs/sslcerts.html

That means your customers' integrations start failing, and they usually find out from their own error logs. Webhooks you send, or that a payment provider sends to you, fail and get retried for a while before the sender gives up. Mobile apps can't reach your API, and if the app pins certificates, users may need an update before it works again. Services that call each other internally fail in a chain, and the first error you see is often a long way from the expired certificate.

Email delivery degrades

Mail servers encrypt connections with STARTTLS. With an expired certificate, many sending servers fall back to delivering without encryption, so mail still arrives but unprotected. Senders that enforce TLS, for example through MTA-STS, won't deliver at all, and those messages are delayed and eventually bounce.

Why it keeps happening

The date isn't a surprise to anyone. What fails is the process around it:

  • The renewal was automated and the automation broke. An API key expired, DNS moved to another provider, or a cron job was removed in a server migration.
  • The renewal worked but the server was never reloaded, so it kept serving the old certificate.
  • The expiry reminder went to someone who left the company or to a shared inbox nobody reads.
  • Nobody knew the certificate existed: an old staging subdomain, a forgotten API endpoint, a load balancer in another region.
  • An intermediate certificate in the chain expired first. (How the chain works.)

This gets harder over the next few years. Certificate lifetimes are going from 398 days down to 47 days by 2029, so renewals happen about eight times a year instead of once.

Catching it early

Keep a list of every hostname that serves TLS, including the ones nobody visits anymore. Certificate Transparency logs help find them, as I describe in certificate lifecycle management. Automate renewal with ACME wherever you can. Then check from the outside what each host actually serves, because that's what visitors get, not what your renewal tool reports. You can do a quick check with openssl:

echo | openssl s_client -connect example.com:443 -servername example.com 2>/dev/null \
  | openssl x509 -noout -enddate

For more than a few domains you want this done on a schedule, with alerts going somewhere your team actually reads, and with domain registrations included, since an expired registration takes the whole site down regardless of the certificate. Here's what happens after a domain expires.

Or check a domain here, no account needed: