Embed a live certificate status badge for any domain
The badge is cached for one hour and updates automatically, so it always reflects the current certificate.
The badge queries the domain's certificate over TLS and renders the result as a small SVG image. It shows days remaining while the certificate is healthy, and switches to expired or unknown when something is wrong, using the familiar green/amber/red convention. Because it is a plain image, it works in GitHub READMEs, documentation sites, dashboards and status pages without any script. Results are cached for one hour, so embedding the badge on a heavily visited page does not hammer the target server.
example.com is checked over HTTPS on port 443.GET /badge/<domain>.svg — the .svg suffix is optional?style= flat, flat-square, for-the-badge or plastic?label= up to 32 characters, ?port= any TLS portimage/svg+xml plus an X-Badge-Status header: valid, expiring, critical, expired or unknownCache-Control: public, max-age=3600, so a visitor fetches each badge at most once an hournotAfter date, converted into days remainingunknown, never as validA badge is a summary, and a summary is only useful if it reports something measured. This page states exactly what is behind the image it serves.
A badge shows the state at the moment it was generated, not continuously. If you embed one, regenerate it on a schedule — otherwise the most likely thing it can be showing is a stale success.
flat-square when the surrounding design is square-cornered.alt attribute so the badge is accessible.