Skip to main content
Web Security

Preventing Silent SSL/TLS Outages: Live Socket Expiry Monitoring & 21-Day Alerts

Why ACME/Let’s Encrypt auto-renewals still fail silently behind CDNs and reverse proxies, and how live TLS socket inspection catches expiry before browsers block your users.

5 min readUpdated 2026-11-15

Why auto-renewal fails in production

Most outages are not caused by forgetting to enable Let’s Encrypt—they happen when a DNS CNAME changes, a Cloudflare/Nginx proxy rule blocks /.well-known/acme-challenge/, or an enterprise load balancer fails to reload a renewed cert.

Because CDN edges cache HTTP responses and dashboards only verify issuance logs, teams often discover the expired certificate only when Chrome displays NET::ERR_CERT_DATE_INVALID to customers.

Inspect the live TLS handshake and alert at < 21 days

Always verify the certificate actually presented on port 443 via a live TLS socket handshake (validTo, daysUntilExpiry, TLS protocol version, and chain authorization).

Trigger warning alerts at 21 days remaining (plenty of buffer for DNS propagation or manual vendor renewal) and critical escalation at under 7 days.

typescript
// Inspect live TLS certificate expiry directly from Node.js
import tls from 'node:tls';

const socket = tls.connect({ host: 'example.com', port: 443, servername: 'example.com' }, () => {
  const cert = socket.getPeerCertificate();
  const daysLeft = Math.floor((Date.parse(cert.valid_to) - Date.now()) / 86_400_000);
  console.log({ protocol: socket.getProtocol(), validTo: cert.valid_to, daysLeft });
  socket.end();
});

Check if your domain already passes these requirements

Run a 15-second live compliance scan across Privacy, EAA 2025, Email Auth, and Security Headers—or generate exact configs using our 6 free tools.