An expired SSL/TLS certificate is one of the few configuration mistakes that takes a site completely offline in an instant. When a certificate lapses, browsers show a full-page interstitial warning and block access — there is no graceful degradation. Because certificates are increasingly short-lived (90 days is now common, and the industry is moving shorter), manual renewal is a recurring outage waiting to happen. This guide covers how to check expiry reliably and how to make sure it never catches you out.
Check expiry from the browser
The fastest manual check for a single site:
- Click the padlock in the address bar, then 'Connection is secure' → 'Certificate is valid'.
- Read the 'Valid to' / 'Expires on' date on the leaf certificate.
- Check that the certificate's Subject Alternative Names (SANs) actually cover the hostname you are visiting.
- This is fine for a spot check but does not scale and is easy to forget.
Check expiry from the command line
For scripting and CI, openssl is the standard tool. To print the validity window of a live site:
- echo | openssl s_client -servername example.com -connect example.com:443 2>/dev/null | openssl x509 -noout -dates
- This prints notBefore and notAfter — notAfter is your expiry date.
- To check whether the cert expires within 30 days, use: openssl x509 -checkend 2592000 (returns non-zero if it will).
- To inspect the full chain and SANs: openssl s_client -showcerts -servername example.com -connect example.com:443
Need help implementing this?
Our certified engineers can assess your environment and build the right solution — free initial assessment, fixed-quote pricing.
Understand the certificate chain
A working certificate is not just the leaf — it is a chain from the leaf up to a trusted root. A common failure is a certificate that is valid but 'not trusted' because the server did not send the intermediate certificate. Desktop browsers often paper over this with cached intermediates, so it can work for you and fail for others.
- Leaf certificate — issued to your hostname; what most people check.
- Intermediate certificate(s) — link the leaf to the root; the server must send these.
- Root certificate — lives in the client's trust store; never sent by the server.
- If a tool reports 'chain not trusted', the usual cause is a missing intermediate — fix the server's certificate bundle to include the full chain.
Automate renewal so it never lapses
The only reliable fix for expiry is automation. Manual calendar reminders fail eventually.
- Use ACME automation (Let's Encrypt with certbot/acme.sh, or your CA's ACME endpoint) to renew and reload automatically.
- For cloud load balancers, use the platform's managed certificates (AWS ACM, OCI Certificates, Azure Key Vault certificates) which auto-renew.
- Add external expiry monitoring that alerts 30 and 14 days before expiry, independent of the renewal system, so a broken renewal is caught before an outage.
- After renewal, verify the deployed certificate actually changed — reloading the wrong process is a classic silent failure.
Add HSTS once HTTPS is solid
HTTP Strict Transport Security (HSTS) tells browsers to only ever connect over HTTPS for your domain. It is a strong hardening, but only add it once HTTPS is correctly configured everywhere — a broken certificate under HSTS is harder to recover from because browsers refuse the insecure fallback. Start with a modest max-age, confirm everything works, then raise it (e.g. one year) and consider includeSubDomains.
Check your certificate now
The fastest way to see everything above at once — expiry, chain trust, hostname/SAN coverage, key strength, the negotiated protocol and cipher, and HSTS — is our free, passive SSL/TLS Deep Analyzer. It opens a single handshake and reports only what it observes, marking anything it cannot prove (like whether legacy protocols are disabled) as Not Verified rather than guessing.
Free tools for this topic
Check your own setup in under a minute
Need Help Implementing This?
Our certified engineers can assess your environment and implement the right solution for your business.
Related Services