NET::ERR_CERT_DATE_INVALID — how to fix
Your connection is not private
Attackers might be trying to steal your information from example.com (for example, passwords, messages, or credit cards).
NET::ERR_CERT_DATE_INVALID
Quick fix: Visitor: check your device's date, time and time zone and enable automatic time. Site owner: check the dates with openssl s_client -connect example.com:443 -servername example.com </dev/null 2>/dev/null | openssl x509 -noout -dates, renew (sudo certbot renew), then reload the web server (sudo systemctl reload nginx).
What it means
Every TLS certificate has a notBefore and notAfter date. Chrome and Edge show NET::ERR_CERT_DATE_INVALID when the current time, as your computer sees it, is outside that range. Firefox shows SEC_ERROR_EXPIRED_CERTIFICATE for the same problem.
So there are two possibilities: the certificate really is expired, or your clock is wrong. If only one site fails, suspect the certificate. If many sites (Google, YouTube...) fail at once, suspect your clock.
Check the certificate dates
Click "Not secure" > certificate details in the browser, or from a terminal:
echo | openssl s_client -connect example.com:443 -servername example.com 2>/dev/null \
| openssl x509 -noout -subject -dates
notBefore=Aug 1 00:00:00 2026 GMT
notAfter=Oct 30 23:59:59 2026 GMT
Compare with date -u. Unix timestamp converter helps when a tool shows epoch seconds.
Fix 1 (visitor): correct the system clock
- Windows: Settings > Time & language > Date & time, turn on "Set time automatically" and "Set time zone automatically", then click "Sync now".
- macOS: System Settings > General > Date & Time, enable "Set time and date automatically".
- Android / iOS: enable automatic date and time.
- Linux:
timedatectl
sudo timedatectl set-ntp true
A dead CMOS battery on an old PC resets the clock at every boot, so the error keeps coming back until the battery is replaced.
Fix 2 (site owner): renew the certificate
With Let's Encrypt / certbot:
sudo certbot certificates # shows expiry dates
sudo certbot renew
sudo systemctl reload nginx # or apache2
If renew fails, run sudo certbot renew --dry-run to see why. Common reasons: port 80 is blocked by a firewall, the /.well-known/acme-challenge/ path is redirected or proxied elsewhere, or DNS points to a different server.
Make sure automatic renewal is active:
systemctl list-timers | grep certbot
Fix 3 (site owner): the server still serves the old certificate
You renewed, but browsers still see the old date:
- The web server was not reloaded. Reload nginx/Apache/HAProxy after renewal (certbot can do it with a deploy hook).
- The config points to an old copy. Use
/etc/letsencrypt/live/<domain>/fullchain.pemandprivkey.pem, not files copied elsewhere. - A load balancer, CDN or another server in front (Cloudflare, AWS ELB, a Kubernetes ingress) has its own certificate. Renew it there.
- Several servers behind DNS: run the
opensslcheck against each IP.
openssl s_client -connect 203.0.113.10:443 -servername example.com </dev/null 2>/dev/null | openssl x509 -noout -dates
Fix 4: an expired root or intermediate on old devices
If the site's certificate is valid but very old devices (outdated Android, old macOS/iOS, old Java) still complain, the problem can be an expired root or intermediate certificate in the device's trust store or in the chain your server sends. Update the device's OS/browser, and on the server serve the current chain from your CA (fullchain.pem for Let's Encrypt).
Do not bypass it
Clicking "Proceed anyway" or typing thisisunsafe hides the warning but not the problem. For an API client, don't disable verification (curl -k, verify=False); fix the certificate or the clock.
Last updated 2026-11-29.