Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

Domain Expiry and SSL Certificate Monitoring You Can Self-Host

说明与用途

每日 cron 任务定期查询域名和 SSL 证书的到期日期,并在阈值前发送警报,提供可靠的自托管监控,防止因证书或域名过期导致的停机。

问题

A site can go dark when its TLS certificate or domain registration expires, yet registrar and CA renewal emails are unreliable and insufficient as a single safety net.

结果

Implementing a daily cron job that polls domain and certificate expiry dates and alerts before thresholds prevents outages caused by expired certificates or domains, offering a low‑cost, self‑hosted alternative to paid monitoring services.

工作流

  • 1. Schedule a cron job to run daily.
  • 2. In the job, perform a WHOIS (or RDAP) lookup for each domain to obtain the expiration date.
  • 3. Compare the expiration date to the current date; if days remaining ≤ EXPIRY_WARNING_DAYS (default 90), generate an alert message.
  • 4. Open a TLS connection to the host, read the certificate’s notAfter field, compare to current date; if days remaining ≤ EXPIRY_WARNING_DAYS, generate an alert.
  • 5. Send alerts via a chosen channel (e.g., Telegram bot).
  • 6. Optionally, set up a dead‑man’s switch that pings if the monitoring job hasn’t reported within its expected window.

证据

A site going down because its TLS certificate expired is an embarrassing kind of outage: nothing actually broke.

来源

Both are avoidable months in advance. Both are, in practice, still one of the more common ways a working site goes dark, because the thing that’s supposed to prevent them – an email from the registrar or the certificate authority – has a habit of not doing its job.

来源

Domain expiry and certificate expiry are two different lookups with the same shape: a periodic poll, not a live health check.

来源

Site Pulse defaults EXPIRY_WARNING_DAYS to 90, which leaves enough runway to actually action a renewal, rather than a 7-day warning that lands the same week as three other fires.

来源

A cron job that checks domain and certificate expiry and pings you before a renewal lapses is a small build – and it’s the kind of unattended automation I set up so nobody finds an outage from a customer complaint.

来源

  • 记录日期: 2026-10-21T11:56:25.545Z