← Blog

October 30, 2026 · 5 min read

Your certificate renewed. Is the public hostname serving it?

Check the TLS certificate a visitor actually receives, distinguish expiry from hostname and chain failures, and avoid false recovery alerts after renewal.

A certificate-expiry alert should inspect the certificate presented by the public hostname, not only the local certificate file or the last successful renewal job. A renewed file can coexist with an old certificate at the serving endpoint. For each hostname, record the observed expiry and separately verify the hostname and trust chain. If the probe fails, the answer is unknown or broken, not 'no certificate expiring.'

Probe the endpoint visitors reach, with its hostname as SNI

OpenSSL's s_client sends the requested server name with -servername. This matters when one endpoint hosts several names. Replace example.com with a hostname you control and run the probe from a network that can reach its public endpoint. The first command checks the TLS verification result; the second prints the served leaf certificate's expiry. Inspect both outputs and command exit status, including pipeline failure. They answer different questions.

openssl s_client -connect example.com:443 -servername example.com -verify_hostname example.com -verify_return_error </dev/null

set -o pipefail
openssl s_client -connect example.com:443 -servername example.com </dev/null | openssl x509 -noout -enddate -subject -issuer

The enddate is a UTC notAfter value, not a promise of continued availability. A leaf certificate with time remaining can still fail hostname or chain verification, or the endpoint can be unreachable. Conversely, a failed handshake yields no trustworthy expiry reading. OpenSSL's x509 -checkend accepts a number of seconds and returns nonzero if the certificate expires within that window, but use it only after a successful certificate read.

Separate the incident types before alerting

ObservationWhat it establishesOperator response
Renewal job succeededA renewal process reported success, not what the endpoint servesProbe the public hostname again
Served certificate expires soonThis endpoint presented a leaf certificate with a near notAfterCheck renewal and deployment path
Handshake, hostname, or trust check failedThe probe cannot confirm usable TLSAlert as a failure; do not report healthy expiry

Run the check for each hostname and port that matters. A CDN edge, an origin, and a second region may serve different certificates. Include the observation time, hostname, endpoint, expiry, and verification outcome in the alert. Recheck the served endpoint before claiming a renewal fixed the problem. Make threshold notifications stateful so a daily check does not resend the same 30-day warning every day.

A prompt alone is not a certificate monitor

Our SSL Cert Monitor gallery item formerly asked web_fetch to read certificate expiry, although a page fetch alone does not expose the presented certificate's expiry. Its revised checklist requires an approved TLS-capable runner or equivalent monitoring API, and treats missing probe access as a blocker. It does not install a schedule, implement renewal, or claim a tested deployment. Test one expiring fixture and one unreachable endpoint, then verify that the intended recipient actually receives each distinct alert.

Inspect the SSL Cert Monitor checklist

Sources and further reading

More posts

October 27, 2026

Your GitHub Actions run history is not your bill

October 23, 2026

A DNS record changed. Should your OpenClaw monitor alert?

October 20, 2026

Zero errors is not always good news: checking the log pipeline before an agent alerts

October 17, 2026

A running container is not a healthy service: an OpenClaw monitoring runbook

October 14, 2026

OpenClaw database backup checks vs restore tests: what each proves

October 5, 2026

OpenClaw automation ran, but no message arrived: diagnose execution and delivery

October 2, 2026

OpenClaw SecretRefs for recurring workflows: a practical migration checklist

September 29, 2026

The scheduled blog queue ran dry: a runway check that catches it early

August 24, 2026

Agent workflow validation checklist before you reuse a template

August 21, 2026

Bounded background tasks for coding agents

August 18, 2026

Agent runbook status files that actually work

August 15, 2026

7 OpenClaw workflows worth running, and 5 that are not

August 12, 2026

The OpenClaw workflow security checklist we use before turning on tools

August 9, 2026

Your HEARTBEAT.md should be boring

August 6, 2026

How to build an OpenClaw automation that survives retries

August 3, 2026

OpenClaw cron vs heartbeat: the production rule that actually works

April 30, 2026

OpenClaw just shipped real voice agent calls. Here are 5 workflows worth setting up.

March 27, 2026

The best OpenClaw skills nobody knows about

March 25, 2026

Top AI agent workflow templates for developers in 2026

March 23, 2026

OpenClaw vs n8n: when to use each for agent automation

March 20, 2026

How to automate Make.com workflows with AI agents

March 18, 2026

Best n8n workflow templates for email automation

March 15, 2026

OpenClaw starter packs: the fastest way to a useful agent

March 12, 2026

How to build your own OpenClaw runbook from scratch

March 9, 2026

5 OpenClaw workflows that save 10 hours/week