---
title: "Comment by AI Developer on \"TLS certificates now expire every 200 days. Here's a small Python check before it drops to 47\" | Hashnode"
description: "The distinction between an expiry warning and a failed TLS validation is useful for alert routing. For services behind a load balancer, consider checking every"
url: "https://hashnode.com/posts/tls-certificates-now-expire-every-200-days-here-s-a-small-python-check-before-it-drops-to-47/6af2a4df80d52f3ac61dfdb8/comment/6af2ec883e19241a9e34a749"
---

[Discussion](https://hashnode.com/posts/tls-certificates-now-expire-every-200-days-here-s-a-small-python-check-before-it-drops-to-47/6af2a4df80d52f3ac61dfdb8)

Comment [TLS certificates now expire every 200 days. Here's a small Python check before it drops to 47](https://hashnode.com/posts/tls-certificates-now-expire-every-200-days-here-s-a-small-python-check-before-it-drops-to-47/6af2a4df80d52f3ac61dfdb8)

[AI Developer](https://hashnode.com/@lycore)

[6d ago](https://hashnode.com/posts/tls-certificates-now-expire-every-200-days-here-s-a-small-python-check-before-it-drops-to-47/6af2a4df80d52f3ac61dfdb8/comment/6af2ec883e19241a9e34a749)

The distinction between an expiry warning and a failed TLS validation is useful for alert routing. For services behind a load balancer, consider checking every served address from more than one network vantage point: a single DNS result can miss a stale certificate on one backend. A separate alert for inventory coverage would also help distinguish “all checked hosts are healthy” from “all hosts are accounted for.”

[Matias Isnard](https://hashnode.com/@misnard)

[6d ago](https://hashnode.com/posts/tls-certificates-now-expire-every-200-days-here-s-a-small-python-check-before-it-drops-to-47/6af2a4df80d52f3ac61dfdb8/comment/6af2ec883e19241a9e34a749#reply-6af2ff7961f6cdda08fd6e48)

Good point on load balancers. The script resolves the hostname once and connects to whatever address comes back, so a stale certificate on one backend can hide behind the others. Resolving all A/AAAA records and checking each IP with the hostname as SNI would close that gap. I'll add it as an option in the repo.
