Skip to content

SSL certificate expiry: why it still happens and how to prevent it

Short answer

A TLS certificate is valid only between its notBefore and notAfter dates; after that, browsers show a full-page warning. Auto-renewal fixed most expiries, but renewals still fail silently when DNS, firewalls or hosting change. Check the date the server actually presents, monitor it independently of the renewal tool, and alert well before expiry.

Steps at a glance

  1. Check the certificate the server presents. Use openssl s_client with -servername to read notAfter from the live certificate.
  2. Identify who renews it. Record whether the host, a CDN, or an ACME client on the server issues the certificate.
  3. Confirm the renewal path still works. Check that HTTP-01 or DNS-01 validation isn't blocked by redirects, firewalls or DNS changes.
  4. Monitor independently. Check expiry from outside on a schedule and alert at 30, 14 and 7 days.

What 'SSL expiry' actually means

What people call an SSL certificate today is an X.509 certificate used by TLS, the protocol behind HTTPS. Each certificate carries two dates, notBefore and notAfter, and binds a public key to one or more hostnames listed in its Subject Alternative Name field. Once notAfter passes, every mainstream browser refuses the connection with an interstitial warning that most visitors won't click through, and API clients fail outright.

Lifetimes have been shrinking. Publicly trusted certificates have been capped at 398 days since 2020, and Let's Encrypt issues 90-day certificates. The CA/Browser Forum has approved a schedule that reduces the maximum further over the coming years. Shorter lifetimes make manual renewal impractical and make automation — and monitoring the automation — essential.

Checking expiry yourself

The only date that matters is the one on the certificate the server is actually presenting. A certificate renewed on disk but not loaded by the web server still expires. From any machine with OpenSSL:

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

issuer=C = US, O = Let's Encrypt, CN = R11
subject=CN = example.com
notBefore=Sep  2 08:14:11 2026 GMT
notAfter=Dec  1 08:14:10 2026 GMT

The -servername flag matters: it sends SNI, so a server hosting many sites returns the certificate for the one you asked about. Without it you may read the wrong certificate. Check www and the apex separately if both are in use; they are often served by different configurations.

In a browser, click the padlock or site-information icon, open the certificate details and read 'Expires on'. That's fine for a spot check but doesn't scale to fifty client sites.

Why auto-renewal still fails

ACME clients such as Certbot, and hosts and CDNs that renew for you, have made expiry rare — which makes the remaining failures more surprising. Common causes we see on agency-managed sites:

  • HTTP-01 validation blocked. The CA must fetch a file under /.well-known/acme-challenge/. A new redirect rule, a security plugin, a maintenance page or a geo-blocking firewall rule can break that fetch.
  • DNS moved. The domain was moved to a new DNS provider or behind a CDN, and the server doing renewals no longer receives the traffic or can't update DNS-01 TXT records with stale API credentials.
  • The site moved hosts but the old server still holds the renewal job, renewing a certificate nobody serves.
  • Renewed but not reloaded. The new certificate is on disk, but the web server was never reloaded.
  • Hostname dropped. A domain was removed from the SAN list during renewal, so www or a subdomain is suddenly uncovered.
  • Billing. A paid certificate or a hosting plan that includes TLS lapsed with the card on file.

Every one of these leaves the renewal tool thinking it did its job, or failing in a log nobody reads. That's why expiry monitoring should run from outside and read the live certificate.

Certificate expiry versus domain expiry

They're often confused and both take a site down. Certificate expiry is about TLS; domain registration expiry is about the registry. If the domain lapses, DNS stops resolving or points to a parking page, and no certificate helps. Domain expiry dates are published by registries through RDAP, which replaced WHOIS for most generic TLDs. Some country-code registries don't publish an expiry date at all; in that case the honest answer is 'unknown', not an estimate.

A monitoring routine for client sites

  • Record for each site who issues and renews the certificate: host, CDN or server-side ACME client.
  • Check the presented certificate on a schedule, with SNI, for each hostname that matters.
  • Alert at 30, 14 and 7 days. With 90-day certificates renewing at 30 days, a 14-day warning means renewal has already failed twice.
  • Check hostname coverage, not only the date: the SAN list must include every hostname you serve.
  • Track domain registration expiry separately via RDAP.
  • After any DNS, CDN or hosting change, check the certificate the next day rather than waiting for the warning.

Where our product stands

Reading a presented certificate requires a raw TLS connection. Our current serverless runtime only exposes a high-level fetch that hides the certificate, so live certificate inspection activates when the service moves to its own servers. Until then, SSL fields show 'Checked after hosting migration' and we never fill them from other sources. Domain expiry from RDAP, with 30/14/7-day warnings, works today.

Reading the rest of the certificate

Expiry is the most common failure, but not the only one worth checking while you have the certificate open. Run the same command with -text to see everything:

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

X509v3 Subject Alternative Name:
    DNS:example.com, DNS:www.example.com
issuer=C = US, O = Let's Encrypt, CN = R11
notAfter=Dec  1 08:14:10 2026 GMT
  • Subject Alternative Name: every hostname the site serves must appear here, or browsers reject the connection with a name-mismatch error even though the certificate is in date.
  • Issuer: a change of issuer you didn't expect usually means someone else's infrastructure, often a CDN or a new host, has started terminating TLS for the domain.
  • Chain: s_client prints the chain the server sent. A missing intermediate certificate works in some browsers that cache intermediates and fails in others and in API clients, which makes it look intermittent.

Name mismatches and incomplete chains are frequently introduced at the same time as a renewal or migration, so a check after any infrastructure change should cover all three, not just the date.

Explaining an expiry to a client

If a certificate does lapse, the client sees a browser warning that says their site is not secure, which reads like a breach. Explain it plainly: the site's identity document expired, no data was exposed, and visitors were warned and turned away until it was renewed. Then say what changes so it doesn't recur, for example 'we now check the live certificate every day and are alerted 30 days before expiry'. A concrete change is more reassuring than an apology.

Record the incident in that month's report with when it was detected and when it was resolved. Clients trust a report that includes the bad day more than one that only ever shows green.

Wildcard and multi-domain certificates

A wildcard certificate for *.example.com covers one level of subdomain but not the apex example.com unless it is listed separately, and not deeper names such as shop.eu.example.com. When one certificate covers many hostnames, a single failed renewal takes them all down at once, so monitor at least one hostname per certificate and know which sites share it.

Frequently asked questions

Try it on a real domain — free, no account needed.