If the browser shows NET::ERR_CERT_DATE_INVALID or Your connection is not private, the SSL certificate has expired.
Check the current certificate expiration date
# Check domain certificate expiration date (from outside)
echo | openssl s_client -connect example.com:443 2>/dev/null | openssl x509 -noout -dates
# List local certbot certificates
sudo certbot certificatesTry renewing immediately
sudo certbot renew --dry-run # Test (does not actually renew)
sudo certbot renew # Actual renewalOn success:
Congratulations, all renewals succeededOn failure, check the causes below one by one.
Cause 1 — Port 80 is blocked
Let's Encrypt requires port 80 to be open for the HTTP-01 challenge.
# Check whether port 80 is listening
sudo ss -tlnp | grep :80
# Check UFW firewall
sudo ufw status | grep 80
# Allow it if it is not open
sudo ufw allow http# Confirm Nginx is running (standalone mode requires it to be stopped)
sudo systemctl status nginxCause 2 — Nginx/Apache config errors causing the plugin to fail
# Validate Nginx configuration
sudo nginx -t
# Specify the web server plugin on renewal
sudo certbot renew --nginx # When using Nginx
sudo certbot renew --apache # When using Apache
# Standalone mode (briefly stop the web server)
sudo systemctl stop nginx
sudo certbot renew --standalone
sudo systemctl start nginxCause 3 — Domain DNS does not point at the server
# Check whether the domain points at this server's IP
dig +short example.com
curl -s ifconfig.me # Server public IPIf the two values differ, the DNS configuration is wrong. If DNS is correct, wait for propagation (up to 48 hours) and retry.
Cause 4 — Rate limit exceeded
Let's Encrypt limits issuance to 5 times per week per domain.
# Check the renewal log
sudo tail -50 /var/log/letsencrypt/letsencrypt.log | grep -i "rate|limit"If you hit the rate limit, wait 7 days and retry, or test against the staging server:
sudo certbot renew --dry-run --stagingVerify automatic renewal
# Check the auto-renewal timer status
sudo systemctl status certbot.timer
sudo systemctl list-timers | grep certbot
# If the timer is missing, check cron
sudo crontab -l | grep certbot
cat /etc/cron.d/certbot# Add an auto-renewal cron job if none exists
echo "0 3 * * * root certbot renew --quiet" | sudo tee /etc/cron.d/certbotApply the renewal in Nginx
sudo nginx -t && sudo systemctl reload nginxThe browser cache may still show the old certificate after renewal. Hard-refresh with Ctrl+Shift+R, or check in a private/incognito window.
AI tools may assist drafting. Check the evidence in each guide for whether commands were run and which environment was used. Confirm the current docs for your version before applying instructions, and email us about errors. email us
Questions & answers
Ask a question about this guide. We'll review and reply.