Fix SSL Certificate Has Expired (CERT_HAS_EXPIRED / ERR_CERT_DATE_INVALID)

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

Quick answer

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:

  1. Is the server still serving the old certificate? A renewal that was issued but never installed, or installed without reloading the server, or installed on only some servers.
  2. Is an intermediate in the chain expired? The server sends an old intermediate bundle alongside a fresh leaf.
  3. Is the client relying on an expired root or cross-sign? Old devices and old OpenSSL versions that don't trust the newer root.
  4. Is the client's clock wrong? A certificate looks expired (or not yet valid) to a machine whose date is off.

The same problem in different clients

ClientErrorMeaning (from the source)
OpenSSL and OpenSSL-based toolscertificate has expired (X509_V_ERR_CERT_HAS_EXPIRED)The notAfter date is before the current time.
OpenSSLcertificate 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.jsCERT_HAS_EXPIRED / CERT_NOT_YET_VALIDCertificate has expired / Certificate is not yet valid (OpenSSL errors reported by Node's TLS module).
Chrome and Chromium browsersNET::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.

Step 1: Check the certificate the server is serving

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:

Step 2: Check every certificate in the chain

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

Step 3: Expired roots and cross-signs on old clients

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.

Step 4: Check the client clock

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.

Certificates are getting shorter: 200, 100, then 47 days

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:

IssuedMaximum validityDomain validation reuse
Before 15 March 2026398 days398 days
15 March 2026 to 14 March 2027200 days200 days
15 March 2027 to 14 March 2029100 days100 days
From 15 March 202947 days10 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.

Monitoring many certificates?

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).

Related tools and guides

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.

FAQ

What does certificate has expired mean?

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 certificate was renewed, why do I still get CERT_HAS_EXPIRED?

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.

Can an expired intermediate certificate cause the error?

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.

What is the maximum SSL certificate validity in 2026?

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.

Why does only one computer show ERR_CERT_DATE_INVALID?

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.

Want the full kit?

Runbooks, checklists and helpdesk templates: IT Admin Packs on Gumroad.