How to get a warning before an SSL certificate or domain expires
Why certificates still expire on servers with automatic renewal, how to watch both the certificate and the domain registration from outside, and how much warning to ask for.
Published: Updated: 4 min read
An expired TLS certificate is one of the few outages with a date printed on it months in advance, and it still catches teams out. Automatic renewal has made it rarer, not impossible: the renewal job stops after a server move, a DNS challenge fails after an API token was rotated, or the new certificate is issued but the web server is never reloaded. Domain registrations lapse the same way, usually because the card on file at the registrar expired before the domain did.
The dependable defence is to check what each server actually presents, from outside, on a schedule, and to be told while there is still time to act. This guide covers what to watch, how far ahead to be warned, and how to set it up in DevKit.
What to watch, and why renewal alone is not enough
- Every hostname and port that serves TLS. Beyond the website on 443, an API subdomain, a mail server on 465 or 993 and an admin panel on another port each have their own certificate, often outside the renewal automation.
- What is served, not what is on disk. A renewed file on the server changes nothing until nginx, Apache or the load balancer reloads it. A check that connects and reads the certificate catches the reload that never happened.
- The chain, not only the date. A server that forgets to send its intermediate certificate can work in a browser that has cached it and fail everywhere else. A certificate that does not cover the requested name fails too, however long it is valid.
- The domain registration. If the domain lapses, every certificate and every record under it goes with it. Confirm that auto-renew is on at the registrar and that the payment method on file is still valid.
How much warning to ask for
Automated clients renew weeks before the end, so a certificate with less than two weeks left usually means renewal has already failed more than once. That is why DevKit's certificate expiry monitor warns 14 days ahead by default. As public certificate lifetimes shrink, renewals run more often and leave less room when one breaks.
Domains get a longer default of 30 days, because fixing a registrar problem can involve a support ticket, a payment or a transfer lock. Raise either number if renewing involves other people, approvals or a change window.
One detail matters here. Expiry monitors are checked once a day, and like every DevKit monitor they open an outage only after the number of consecutive failed checks you set, three by default. With daily checks that adds a couple of days. Either add that to the warning, or set Outage after to one failed check in the monitor's settings; an expiry date does not flap, so a single failure is a trustworthy signal.
Set it up in DevKit
- Look at the certificate first. Open Tools › TLS, enter the hostname and port and run the check. You see the days left, the names the certificate covers, the chain the server sent and the SHA256 fingerprint, checked from your device. The network tools need no account.
- Start monitoring from the result. Under the result, Start monitoring creates a certificate expiry monitor for the same host and port. Cloud monitors work before you sign in, and every workspace starts on the Free plan.
- Set the warning. Under Options, Warn this many days before starts at 14 for a certificate. Then open the monitor's settings and choose how many failed checks open an outage.
- Add the domain itself. Create a monitor of the kind Domain expiry with the registered name, for example example.com rather than www.example.com. Its warning starts at 30 days.
- Decide who hears about it. Email and the in-app inbox are included on Free; webhook, Slack, Discord and Telegram alerts come with Pro. If you already watch an HTTPS endpoint with an HTTP monitor, it also tells you when its certificate is 14, 7 and 1 days from expiry.
What these checks do not cover
- Monitors run from DevKit's servers, which refuse private and local addresses. A certificate on an internal host can be inspected with the TLS tool on your phone, but not watched from the cloud.
- The domain check reads the expiry date over RDAP, the registry protocol that replaced WHOIS. If a registry does not publish the date or cannot be reached, the monitor shows no data rather than guessing; keep the registrar's own reminders switched on.
- The certificate monitor connects with normal verification, so an untrusted chain or a name the certificate does not cover counts as a failed check as well, not only a date that is too close.
- DevKit does not renew anything. It tells you in time; the renewal stays with your certificate client, hosting provider or registrar.