ssl-guides 2026-12-02 ⏱ 3 min read

Free SSL Certificate Expiry Monitor

Free SSL Certificate Expiry Monitor
Quick Answer: Check the notAfter date of each certificate on a schedule and alert when less than a third of the lifetime is left. You can do this with a short OpenSSL script in cron, a free uptime monitor with SSL checks, or manual scans with an online checker. Test that the alert reaches a person.

SSL certificate expiry monitor: why it matters

Certificates last 90 days or less when free, so expiry comes around often. When one lapses, browsers show a full-page warning and many visitors leave. Renewal automation fails more often than people expect: a changed DNS record, a blocked challenge path, a server moved without its cron job. Monitoring catches the failure before visitors do.

SSL certificate expiry monitor: a shell script with OpenSSL

#!/bin/bash
# usage: ./certcheck.sh example.com 21
host="$1"; warn_days="${2:-21}"
end=$(echo | openssl s_client -servername "$host" -connect "$host:443" 2>/dev/null \
      | openssl x509 -noout -enddate | cut -d= -f2)
end_s=$(date -d "$end" +%s)
left=$(( (end_s - $(date +%s)) / 86400 ))
echo "$host expires in $left days ($end)"
if [ "$left" -lt "$warn_days" ]; then
  echo "WARNING: $host certificate expires in $left days" | mail -s "SSL expiry: $host" you@example.com
fi

Schedule it daily with cron:

0 7 * * * /usr/local/bin/certcheck.sh example.com 21

This needs a working mail command on the server. Replace it with a webhook call to Slack or another chat tool if you prefer. The date -d form is for GNU date. On macOS use date -j -f.

Option 2: Hosted monitors

Free tiers of uptime tools often include SSL expiry alerts for a handful of URLs. Check what each offers: alert channels, how many days ahead it warns, and whether it checks the certificate served on the public hostname. A monitor that only pings the page may not alert on expiry.

Option 3: Manual checks

Paste the domain into the SSL Checker and read the expiry date. This suits a few domains and a monthly routine. Use the SSL/CSR Decoder on a certificate file before installing it, so you know the dates in advance.

Choosing a warning window

Certificate lifetimeSuggested first alertSecond alert
90 days (free ACME)30 days10 days
1 year45 days14 days
Manual install, no automation30 days14 days

Two alerts give you a second chance if the first one is ignored.

After you renew

Confirm the new certificate is actually being served. A renewed file on disk does nothing until the web server reloads. Run the check again, and verify that mail, FTP and control panel services that use the same certificate were reloaded too.

Alert delivery matters

An alert that nobody sees is no alert. Send it to a shared mailbox or team chat, not to one person's inbox. Test the path by temporarily setting a warning window larger than the days remaining, so the alert fires on purpose. If you run several servers, label the hostname in the subject line. Keep the script in version control and note which cron user runs it, since a cron job under the wrong user may lack network or mail access.

Related reading: the full expiry alert guide, monitoring many certificates and the certificate lookup tool.

Frequently Asked Questions

How far ahead should alerts fire?

Thirty days for a 90-day certificate is a good default, with a second reminder at around ten days.

Does monitoring check intermediate certificates?

A simple expiry script checks the leaf. An intermediate that expires can also break trust, so a full chain scan is a good periodic addition.

Can I monitor many domains?

Yes. Loop over a list of hostnames in the script, or use a monitor that supports bulk import.

What if my site is behind Cloudflare?

The script sees the edge certificate. Monitor the origin separately if it has its own certificate.

Does the alert window change when lifetimes shrink?

Yes. A fixed 30 days is half the life of a 64-day certificate. Set the alert as a fraction of the lifetime instead.

🔒 Test Your Website SSL Certificate Now
Run Free SSL Check →

✅ Post-Installation Verification & SEO Checklist

After applying the steps above, run through this 5-point checklist to prevent browser warnings and protect your Google SEO rankings:

  • Verify full CA chain trust and TLS 1.3 support using our Live SSL Checker.
  • Scan for Mixed Content HTTP links and check HSTS/CSP headers on Security Headers Checker.
  • Enforce a permanent 301 HTTP-to-HTTPS redirect with our HTTPS Redirect Generator.
  • Confirm both root and www versions resolve cleanly to one canonical HTTPS URL.
  • Verify your HTTPS property and sitemap.xml inside Google Search Console and Bing Webmaster Tools.
Technically Reviewed by TryFreeSSL Security Team
Last updated: 2026-12-05
About Us →

Free SSL Certificates, Live SSL Checker & CSR Generator

Issue trusted Let's Encrypt SSL certificates in 60 seconds with zero server setup.

Related Articles

🤖 TryFreeSSL AI Assistant