Guide · SSL/TLS
How to renew an SSL certificate
An expired certificate is one of the most common reasons a website suddenly stops loading. The good news: renewal is usually one command or a couple of clicks — once you know where and when to do it.
Why certificates expire
A TLS certificate does not last forever. Every certificate has a start and end of validity, and the browser checks both. Once the end date has passed, the browser aborts the connection and shows a warning — to the visitor the site looks broken, even if the server itself is healthy.
A short lifetime is a security measure: it forces regular renewal and limits the damage if a private key is ever leaked. This is why “renewal” is not technically an extension of the same certificate — the issuer always issues a new certificate with a new serial number and validity period.
When to renew
The rule is simple: start at least 30 days before expiry. That leaves enough time if DNS, port 80 or automation lets you down.
- A default Let's Encrypt certificate is valid for 90 days.
- Under the CA/B Forum schedule, the maximum validity of public TLS certificates is being reduced in stages: 200 days from March 2026, 100 days from 2027 and 47 days from 2029. The shorter the lifetime, the more important automation becomes.
- If the certificate has already expired, waiting will not help — renew immediately and investigate why automatic renewal did not run.
The quickest way to see the current validity period is the ssl.ee checker or the command line:
openssl s_client -connect example.com:443 -servername example.com </dev/null 2>/dev/null \
| openssl x509 -noout -dates -issuer -subject
Option A: Let's Encrypt and Certbot
If your server runs Linux and you have SSH access, Certbot is the most common solution. The examples below are for Debian/Ubuntu with Nginx; for Apache, swap the package and plugin names.
1. Install Certbot
sudo apt update
sudo apt install certbot python3-certbot-nginx
2. Obtain a certificate
sudo certbot --nginx -d example.com -d www.example.com
Certbot asks for an email address, agreement to the terms and whether to redirect HTTP traffic to HTTPS. It then edits the Nginx configuration and reloads it.
3. Test automatic renewal
sudo certbot renew --dry-run
systemctl list-timers | grep certbot
Certbot normally installs a system timer (certbot.timer) that runs renewal twice a day. Renewal only happens once the certificate has less than 30 days left — so “nothing happened” is a normal and expected result.
4. Add a reload hook
A new certificate only takes effect once the web server reloads it. Create /etc/letsencrypt/renewal-hooks/deploy/reload-nginx.sh:
#!/bin/sh
systemctl reload nginx
sudo chmod +x /etc/letsencrypt/renewal-hooks/deploy/reload-nginx.sh
Tip: a DNS-01 challenge is required for a wildcard certificate (*.example.com). A manual (--manual) DNS challenge does not renew automatically — use a plugin or API script for your DNS provider.
Option B: Cloudflare
If your domain is behind the Cloudflare proxy (orange cloud), Cloudflare manages the edge certificate for you. In most cases you do not need to run Certbot on the server at all.
- Universal SSL — a free edge certificate that Cloudflare renews automatically. Check under SSL/TLS → Edge Certificates.
- Always Use HTTPS — enable it so HTTP is redirected to HTTPS automatically.
- SSL/TLS mode — use Full (strict) when the origin server has a valid certificate. Flexible leaves the connection between the server and Cloudflare unencrypted.
- Origin Certificate — a certificate issued by Cloudflare for the origin server; valid for up to 15 years and therefore renewed far less often. Create one under SSL/TLS → Origin Server.
Note: if you use a short-lived Let's Encrypt certificate together with Cloudflare's Full (strict) mode, the origin certificate must also be valid. Renewing the Cloudflare edge certificate does not renew the one on your server.
Option C: cPanel and Plesk
Shared hosting panels usually renew with a single button.
- cPanel: open SSL/TLS Status and click Run AutoSSL. Make sure the domain and
wwware listed and the status is “Valid”. - Plesk: go to Websites & Domains → SSL/TLS Certificates → Let's Encrypt and renew the certificate. Plesk can also do this automatically when enabled.
Post-renewal checklist
Renewal is only half the job. Check the following:
- The server is serving the new certificate. Compare the dates with
openssl s_clientor check the result on ssl.ee. - The chain is complete. In Nginx use
fullchain.pem, not just the leaf certificate. A missing intermediate causes errors in older clients. - All names are covered. Make sure the SAN list contains both
example.comandwww.example.comif both must work. - Redirects work.
http://should redirect tohttps://in a single hop. - Mixed content is gone. Open the browser console and look for HTTP links to images, scripts or fonts.
- Automation is proven.
certbot renew --dry-runmust finish without errors.
Common failures
| Error or symptom | Cause and fix |
|---|---|
too many certificates already issued | Let's Encrypt rate limit. Wait, or use the staging environment for testing (--staging). |
Challenge failed / connection refused | Port 80 is blocked by a firewall, DNS points elsewhere, or the virtual host does not respond. Test with curl -I http://example.com/.well-known/acme-challenge/test. |
CAA record prevents issuance | The domain has a CAA record that does not allow this issuer. See the CAA and DNSSEC guide. |
unable to get local issuer certificate | A missing intermediate. Use the full chain (fullchain.pem). |
| The certificate is new but the browser still shows the old one | The web server was not reloaded, or a CDN is caching the old certificate. Check systemctl reload nginx and the CDN settings. |
certificate is not yet valid | The server or client clock is wrong. Check NTP. |
How to stop forgetting
The best certificate is the one you do not have to remember to renew. Set up two things:
- Automatic renewal — the Certbot timer, Cloudflare Universal SSL or hosting AutoSSL.
- External monitoring — independent monitoring that alerts 30, 14 and 7 days before expiry. It also catches the case where the automation itself breaks.
The ssl.ee check shows the number of days left and marks a certificate as “expiring soon” when fewer than 30 days remain. You can also add a calendar reminder from the result page.
Check right now whether the renewal took effect and the chain is healthy.
Frequently asked questions
Does renewal interrupt the website?
Issuing a new certificate does not interrupt anything. A brief interruption is possible only during the server reload if the configuration contains an error. Always run nginx -t or apachectl configtest before reloading.
Is a free Let's Encrypt certificate weaker than a paid one?
No. The encryption strength is the same. The difference is the validation type (domain vs organisation validation) and the level of support, not how strongly the connection is encrypted.
Can the same certificate be extended?
No — the issuer always issues a new certificate. “Renewal” means obtaining a new certificate and replacing the old one.
Why does a certificate have several names?
The SAN field (Subject Alternative Name) lists every name the certificate is valid for, such as example.com and www.example.com. If a name is missing, the browser shows a warning on that address.