How to Check If Your SSL Certificate Is Expiring (5 Easy Methods)
An expired SSL certificate is one of the most commonโand most preventableโwebsite issues. When your certificate expires, visitors see scary warning pages, and many will leave immediately. Need help understanding what those warnings mean? See our guide on common SSL certificate errors. Let's look at how to check your certificate's expiration date and make sure you never get caught off guard.
Why Certificate Expiration Matters
When your SSL certificate expires:
- ๐ซ Browsers show full-page security warnings
- ๐ Traffic drops as visitors bounce
- ๐ Search rankings can be affected
- ๐ณ Payment processing may fail
- ๐ฑ You look unprofessional
The good news? This is 100% preventable with proper monitoring.
Method 1: Check in Your Browser (Quickest)
The fastest way to check any website's certificate:
Chrome
- Visit the website
- Click the padlock icon in the address bar
- Click "Connection is secure"
- Click "Certificate is valid"
- Look for "Valid from" and "Valid to" dates
Firefox
- Visit the website
- Click the padlock icon
- Click the arrow next to "Connection secure"
- Click "More Information"
- Click "View Certificate"
- Check the "Validity" section
Safari
- Visit the website
- Click the padlock icon in the address bar
- Click "Show Certificate"
- Look for expiration date in the details
Edge
- Visit the website
- Click the padlock icon
- Click "Connection is secure"
- Click the certificate icon
- View validity dates
Method 2: Use GuardSSL (Recommended)
For detailed certificate information and ongoing monitoring:
- Go to GuardSSL
- Enter your domain name
- Click "Check SSL"
You'll see:
- Exact expiration date and time
- Days remaining until expiration
- Certificate issuer
- Full certificate chain
- Any configuration issues
Pro tip: Create a free account to set up expiration alerts and monitor multiple domains.
Method 3: Command Line (For Developers)
If you're comfortable with the terminal, OpenSSL gives you detailed info:
Basic Expiration Check
echo | openssl s_client -servername example.com -connect example.com:443 2>/dev/null | openssl x509 -noout -dates
Output:
notBefore=Jan 15 00:00:00 2024 GMT
notAfter=Jan 15 23:59:59 2025 GMT
Days Until Expiration
echo | openssl s_client -servername example.com -connect example.com:443 2>/dev/null | openssl x509 -noout -enddate -checkend 0
Full Certificate Details
echo | openssl s_client -servername example.com -connect example.com:443 2>/dev/null | openssl x509 -noout -text
Quick Script for Multiple Domains
#!/bin/bash
domains=("example.com" "example.org" "example.net")
for domain in "${domains[@]}"; do
expiry=$(echo | openssl s_client -servername $domain -connect $domain:443 2>/dev/null | openssl x509 -noout -enddate | cut -d= -f2)
echo "$domain expires: $expiry"
done
Method 4: Online SSL Checkers
Besides GuardSSL, other tools can check certificate expiration:
- SSL Labs (ssllabs.com) - Comprehensive but slower
- SSL Shopper - Quick checker
- DigiCert Tool - From a major CA
These are good for one-off checks but don't offer monitoring.
Method 5: Check Your Hosting Panel
Most hosting providers show certificate status:
cPanel
- Log into cPanel
- Go to Security โ SSL/TLS Status
- View expiration dates for all certificates
Plesk
- Log into Plesk
- Go to Websites & Domains
- Click SSL/TLS Certificates
- View certificate details
Cloudflare
- Log into Cloudflare dashboard
- Select your domain
- Go to SSL/TLS โ Edge Certificates
- View certificate status
Setting Up Expiration Monitoring
Checking manually is fine, but automated monitoring is better. Here's how to set it up:
Option 1: GuardSSL Monitoring
- Create a GuardSSL account
- Add your domains
- Configure alert thresholds (e.g., 30 days, 14 days, 7 days)
- Choose notification method (email, Slack, etc.)
Option 2: Let's Encrypt Auto-Renewal
If you're using Let's Encrypt with Certbot:
# Check renewal status
sudo certbot certificates
# Test renewal process
sudo certbot renew --dry-run
# Set up auto-renewal (usually automatic)
sudo systemctl status certbot.timer
Option 3: Cron Job Script
Create a simple monitoring script:
#!/bin/bash
DOMAIN="example.com"
DAYS_WARNING=30
EMAIL="[email protected]"
expiry_date=$(echo | openssl s_client -servername $DOMAIN -connect $DOMAIN:443 2>/dev/null | openssl x509 -noout -enddate | cut -d= -f2)
expiry_epoch=$(date -d "$expiry_date" +%s)
current_epoch=$(date +%s)
days_left=$(( ($expiry_epoch - $current_epoch) / 86400 ))
if [ $days_left -lt $DAYS_WARNING ]; then
echo "SSL certificate for $DOMAIN expires in $days_left days!" | mail -s "SSL Expiration Warning" $EMAIL
fi
Add to crontab to run daily:
0 9 * * * /path/to/ssl-check.sh
Option 4: Uptime Monitoring Services
Many uptime monitors include SSL checking:
- UptimeRobot
- Pingdom
- StatusCake
- Better Uptime
What to Do When Your Certificate Is Expiring
30+ Days Before Expiration
- โ Verify auto-renewal is configured
- โ Check that renewal emails go to a monitored address
- โ Test the renewal process
14 Days Before Expiration
- โ ๏ธ If not auto-renewing, start the renewal process
- โ ๏ธ Contact your CA if there are issues
- โ ๏ธ Prepare new certificate if switching providers
7 Days Before Expiration
- ๐จ Renew immediately if not done
- ๐จ Have a backup plan ready
- ๐จ Alert your team
Day of Expiration
- ๐ฅ Emergency renewal needed
- ๐ฅ Consider temporary solutions (Cloudflare, etc.)
- ๐ฅ Communicate with users if there's downtime
Common Expiration Scenarios
Let's Encrypt (90-day certificates)
Let's Encrypt certificates expire every 90 days, but Certbot handles renewal automatically. If renewal fails:
- Check Certbot logs:
sudo journalctl -u certbot - Verify domain is accessible
- Check for port 80/443 blocks
- Run manual renewal:
sudo certbot renew
Commercial Certificates (1-2 year)
Longer validity but easier to forget:
- Set calendar reminders
- Use monitoring services
- Keep renewal contact info updated
- Start renewal process 30 days early
Wildcard Certificates
Same process, but remember:
- DNS validation may be required
- All subdomains are affected if it expires
- Renewal might need DNS access
Preventing Expiration Issues
Best Practices
- Use auto-renewal whenever possible
- Monitor multiple ways - Don't rely on just one method
- Keep contact info updated - CAs send renewal reminders
- Document your certificates - Know what you have and when they expire
- Test renewal process - Don't wait until the last minute
- Have a backup plan - Know what to do if renewal fails
Create a Certificate Inventory
Keep track of all your certificates:
| Domain | Type | Issuer | Expires | Auto-Renew | Notes |
|---|---|---|---|---|---|
| example.com | DV | Let's Encrypt | 2024-03-15 | Yes | Main site |
| api.example.com | DV | Let's Encrypt | 2024-03-15 | Yes | API server |
| admin.example.com | OV | DigiCert | 2025-01-20 | No | Manual renewal |
Key Takeaways
- Check certificate expiration regularly using browser, command line, or monitoring tools
- Set up automated monitoring to get alerts before expiration
- Use auto-renewal (Let's Encrypt + Certbot) when possible
- Start renewal process at least 30 days before expiration
- Keep a certificate inventory for all your domains
Want hassle-free SSL monitoring? Add your domains to GuardSSL and get automatic expiration alerts.
Check Your SSL Certificate Now
Want to see these certificate details for your own website? Use our free SSL checker to instantly analyze your certificate's security, validity, and configuration.
No registration required โข Instant results โข 100% free