How to monitor SSL certificate expiry before it bites
An expired TLS certificate is one of the most avoidable outages. Browsers block your users, API clients fail, and the fix is usually a renewal that should have happened weeks ago. Here is how to check SSL certificate expiry by hand, why a one-off check is not enough, and how to set up monitoring so a certificate never expires in production by surprise.
Why certificates still expire in 2026
ACME and Let's Encrypt made renewal mostly automatic, and most public-facing certificates now renew themselves. The certificates that still expire tend to sit at the edges of that automation:
- A renewal job that fails silently. The cron entry disappeared in a server rebuild, the systemd timer is disabled, or renewal succeeds but the deploy hook never reloads the web server, so it keeps serving the old certificate.
- DNS challenge credentials that were rotated. DNS-01 validation needs an API token; when that token is rotated or its permissions change, renewals fail quietly and the errors pile up in a log nobody reads.
- A certificate copied by hand. A load balancer, VPN appliance or mail server that received a certificate once over scp. There is no renewal job because there was never automation, just a person who has since changed teams.
- Internal services with a private CA. No ACME, no public issuer: issuance is a manual ticket, and expiry lives in someone's calendar.
- Intermediate certificates. The leaf is renewed on time, but an intermediate in the chain you serve expires. Browsers sometimes paper over it; API clients and older devices often do not.
Certificate lifetimes are shrinking
The margin for error is getting smaller. The CA/Browser Forum voted to reduce the maximum certificate lifetime to 47 days by 2029, with the first step down to 200 days in March 2026. Renewal stops being an annual chore and becomes a routine that runs every few weeks. At that cadence, manual processes and silent failures stop being survivable: automation plus independent expiry monitoring is the only workable setup.
How to check SSL certificate expiry by hand
You can check SSL certificate expiry from any machine with OpenSSL:
openssl s_client -connect example.com:443 -servername example.com </dev/null 2>/dev/null | openssl x509 -noout -dates -subject -issuer
This performs the TLS handshake and prints the certificate's validity dates, subject and issuer. The line that matters is notAfter: the moment the certificate expires, in GMT. After it, clients are supposed to reject the connection. notBefore tells you when the certificate was issued, which is a quick way to confirm a renewal actually landed.
The -servername flag sets SNI. Without it, a server hosting several domains may hand you its default certificate instead of the one for the site you care about, so always pass the hostname you are checking.
Port 443 is an assumption, not a rule. Anything that speaks TLS can be checked the same way: implicit-TLS SMTP on 465, an internal service on 8443, a database, an MQTT broker.
openssl s_client -connect mail.example.com:465 -servername mail.example.com </dev/null 2>/dev/null | openssl x509 -noout -enddate
To inspect the whole chain rather than just the leaf, add -showcerts to the s_client call and check the dates on every certificate the server presents. Tedious, which is exactly why it belongs in a monitor rather than in your memory.
If you want the same answer without a terminal, our free SSL certificate checker runs a one-off check from the browser, no signup required.
What good SSL certificate expiration monitoring does
A manual check tells you the state right now. It says nothing about the renewal that fails next month, and it only covers the hosts you remembered. SSL certificate expiration monitoring is the same check, run on a schedule, with alerts. A good setup:
- Runs on a schedule (daily is plenty when your warning window is 30 days) and covers every endpoint that serves a certificate, not just the main website.
- Looks at the whole presented chain, not only the leaf. An intermediate can expire before the leaf, and the soonest expiry in the chain is the one that will hurt you.
- Uses two thresholds: a warning well ahead of expiry that creates a ticket, and a critical threshold close to expiry that pages someone.
- Alerts where the team already works: chat, email, or whatever feeds your on-call rotation. A dashboard nobody opens is not monitoring.
Warn early, page late
Thirty days out, an expiring certificate is a task, not an incident: renew it, fix the broken job, update the appliance. Seven days out, it is an outage waiting to happen, and someone should be paged. Two thresholds keep the early signal quiet enough that people do not mute it, and the late signal loud enough that they cannot ignore it.
Watch the domain and the internal hosts
Certificate expiry is not the only clock running. If the domain registration lapses, the certificate, the website and everything else on that domain go down together, and recovery is slower than a renewal. Monitor domain expiry with the same two-threshold approach.
And do not limit monitoring to what the internet can reach. Internal services with private-CA certificates expire too, and they are usually the ones with no automation at all. Those checks need to run from inside the network, without exposing the hosts.
How we do this in SolidPing
We built SolidPing, an open-source uptime monitoring and alerting tool you can self-host (Docker, Kubernetes, binaries) or use as a hosted service at solidping.io. The SSL check maps directly to the practices above.
It connects to host:port, 443 by default but any port is allowed, with an optional SNI server name override and a connection plus handshake timeout (10 seconds by default, up to 30). It reads the whole presented certificate chain and uses the soonest-expiring certificate in it, so an expiring intermediate is caught even when the leaf is fine. Along with days remaining as a metric, it reports the issuer, subject, DNS names and TLS version.
Two thresholds control the state: warningDays marks the check as Warning (amber, no incident, no page) and criticalDays marks it Down, which opens an incident and pages. Both default to 30 days; a typical setup is warning at 30 and critical at 7. Alerts go to the notification channels you configure (Slack, email, webhooks), and incidents can follow an on-call schedule so the page reaches whoever is on duty.
A separate domain check watches registration expiry through RDAP, with the same warning and critical thresholds. For internal hosts, a private agent runs checks from inside your network, so services with private-CA certificates are monitored without being exposed. SSL and domain are two of the available monitors; the full list of check types covers the rest.
A short checklist
- Inventory every endpoint that serves a certificate: edge, load balancers, appliances, mail, internal services.
- Automate renewal where possible, and verify the new certificate is actually loaded after each renewal.
- Check the whole chain and alert on the soonest expiry, not just the leaf.
- Set two thresholds: a quiet warning around 30 days, a page around 7.
- Monitor domain registration expiry alongside certificate expiry.
- Run checks from inside the network for hosts the internet cannot reach.
- Test the alert path once, so you know a warning reaches a human before it matters.
None of this is exotic: a scheduled check, two thresholds, and an alert that lands where people will see it. Set it up once and certificate expiry stops being a source of surprises.
