What certificate has expired, CERT_HAS_EXPIRED and ERR_CERT_DATE_INVALID mean, how to tell an expired leaf from an expired intermediate, an old root or a wrong clock, and the shorter certificate lifetimes coming from 2026 to 2029.
Home › Guides › SSL certificate has expired
Last updated 18 November 2026
OpenSSL's error X509_V_ERR_CERT_HAS_EXPIRED (certificate has expired) means the notAfter date is before the current time. It can apply to any certificate in the chain, not just the server's own: OpenSSL checks the validity period of every element in the chain, including the root, against the current system time. So check, in this order:
| Client | Error | Meaning (from the source) |
|---|---|---|
| OpenSSL and OpenSSL-based tools | certificate has expired (X509_V_ERR_CERT_HAS_EXPIRED) | The notAfter date is before the current time. |
| OpenSSL | certificate is not yet valid (X509_V_ERR_CERT_NOT_YET_VALID) | The notBefore date is after the current time. Usually a client clock set in the past, or a brand-new certificate on a machine with a slow clock. |
| Node.js | CERT_HAS_EXPIRED / CERT_NOT_YET_VALID | Certificate has expired / Certificate is not yet valid (OpenSSL errors reported by Node's TLS module). |
| Chrome and Chromium browsers | NET::ERR_CERT_DATE_INVALID (net error -201) | The certificate, by the browser's clock, appears either not yet valid or expired. |
Chromium's source lists three reasons for -201: an attacker presenting an old certificate whose private key they obtained; a misconfigured server that isn't presenting a valid certificate; or the user's clock is wrong. Rule out the clock first when only one machine complains.
RFC 5280 defines the validity period as the time from notBefore through notAfter, inclusive, and its path validation requires that each certificate's validity period includes the current time.
echo | openssl s_client -connect www.example.com:443 -servername www.example.com 2>/dev/null | openssl x509 -noout -subject -issuer -dates
-dates prints notBefore and notAfter (-enddate prints only the expiry). For a mail server use -starttls smtp -connect mx.example.com:25. If notAfter is in the past but you already renewed:
curl -sv --resolve www.example.com:443:203.0.113.10 https://www.example.com/ -o /dev/null or openssl s_client -connect 203.0.113.10:443 -servername www.example.com. Load balancers, CDNs, mail gateways and appliances often hold their own copy.openssl s_client -connect www.example.com:443 -servername www.example.com -showcerts
-showcerts prints every certificate exactly as the server sent it. Save each PEM block to a file and run openssl x509 -in cert1.pem -noout -subject -enddate on it. If the leaf is current but an intermediate has expired, replace the intermediate bundle with the one your CA currently provides (the incomplete chain guide shows how to build the chain file for nginx and Apache), then reload. To test the files before installing them:
openssl verify -show_chain -untrusted intermediate.pem server.pem
If modern browsers are fine but an old device, an embedded system or an old API client fails, the client may be building its chain to a root or cross-signed certificate that has expired. The best-known case: Let's Encrypt's cross-signature from DST Root CA X3 expired on 30 September 2021. Let's Encrypt said older devices that don't trust its own root, ISRG Root X1, would start getting certificate warnings, and that API clients using OpenSSL needed to trust ISRG Root X1 and run OpenSSL 1.1.0 or later, because a quirk in OpenSSL 1.0.x made even clients that trusted ISRG Root X1 fail on the compatibility chain. The fix is on the client: update its trust store and TLS library, or replace the device. Changing the server certificate won't help a client that doesn't trust the current root.
If the server's dates look right, compare the client's date and time zone with real time and fix its time sync. To see whether a certificate would verify at a different moment, OpenSSL's -attime option (seconds since 1 January 1970) replaces the current time during verification:
openssl verify -attime 1798761600 -untrusted intermediate.pem server.pem
Here 1798761600 is 1 January 2027 00:00 UTC (date -u -d @1798761600 on Linux converts it).
Don't use -no_check_time or curl's -k to make the error go away in production: they hide real expiry problems too.
The CA/Browser Forum Baseline Requirements (section 6.3.2, version 2.3.1 of 4 October 2026) cap the validity of publicly trusted server certificates by issue date:
| Issued | Maximum validity | Domain validation reuse |
|---|---|---|
| Before 15 March 2026 | 398 days | 398 days |
| 15 March 2026 to 14 March 2027 | 200 days | 200 days |
| 15 March 2027 to 14 March 2029 | 100 days | 100 days |
| From 15 March 2029 | 47 days | 10 days |
(Each step also says certificates SHOULD NOT exceed one day less: 397, 199, 99 and 46 days.) Manual yearly renewals are already gone: a certificate issued today lasts at most 200 days, and from March 2027 at most 100. Automate issuance and installation (ACME, RFC 8555, is the protocol the Baseline Requirements reference), and monitor what each server actually serves so a renewal that didn't deploy is caught before it expires.
For a quick check of one certificate file, openssl x509 -in cert.pem -noout -checkend 2592000 exits non-zero if the certificate expires within the next 2,592,000 seconds (30 days), which is easy to use in a script or cron job.
The Bulk SSL Certificate Expiry Monitor on Apify connects to each server and reads the certificate it is serving right now, on any port, including SMTP, IMAP and POP3 STARTTLS. It checks every IP behind a name, reports days left, flags untrusted chains and hostname mismatches, and can run on a schedule ($1 per 1,000 endpoints).
Check issued certificates and days left with the SSL Certificate Checker, find every A and AAAA record behind a name with DNS Lookup, confirm DNS changes with the DNS Propagation Checker, schedule renewal scripts with the Cron Expression Explainer and check mail hosts with the MX Record Lookup and MTA-STS Checker. Related guides: SSL certificate name mismatch, unable to get local issuer certificate and Exchange Online 4.4.7 message expired.
OpenSSL defines it as the notAfter date of a certificate being before the current time. It can be the server certificate, an intermediate or a root in the chain, or the client clock may be wrong.
The server is probably still serving the old certificate: the new file was not installed where the configuration points, the service was not reloaded, or another server or load balancer behind the same name still has the old one. Check what each IP serves with openssl s_client.
Yes. OpenSSL checks the validity period of every certificate in the chain, including the root. Replace the intermediate bundle with the current one from your CA and reload the server.
Under the CA/Browser Forum Baseline Requirements, public server certificates issued from 15 March 2026 can be valid for at most 200 days. That drops to 100 days from 15 March 2027 and 47 days from 15 March 2029.
If other machines are fine, check that computer date, time and time zone. Chromium lists a wrong clock as one of the causes of ERR_CERT_DATE_INVALID. Old devices that do not trust a current root can also fail.
Runbooks, checklists and helpdesk templates: IT Admin Packs on Gumroad.