Skip to content
Guide

SSL certificate expired: how to fix it and keep it fixed

By the OnCallKeeper team · Published · Updated

When a TLS certificate expires, browsers block visitors with a full-page warning such as NET::ERR_CERT_DATE_INVALID, API clients fail the handshake and webhooks stop arriving. The cure is almost always the same: renew the certificate, install it where it is actually served, reload the server and verify from the outside. This guide walks through each step.

The short version

  • An expired certificate means the certificate being served has passed its end date, even if a renewed one is already sitting on disk.
  • Most expiry outages come from a failed auto-renewal or a renewed certificate that was never loaded, not from forgetting to buy one.
  • The fix: confirm what expired, find out why renewal failed, renew, install the full chain, reload and verify.
  • To prevent a repeat, automate renewal and alert on expiry at 30, 14 and 7 days.

Why SSL certificates expire

Every certificate carries a validity window. After the end date, browsers and clients refuse to trust it, because an old certificate could belong to a key that was lost or stolen. Lifetimes keep getting shorter: Let's Encrypt certificates last 90 days, and the CA/Browser Forum is phasing public certificates down to 200 days (from March 2026), 100 days (from March 2027) and 47 days (from March 2029). Manual renewal stops being realistic.

These are the causes behind most expired-certificate incidents:

  • The auto-renewal job fails silently: a broken HTTP or DNS challenge, a changed web root, a firewall rule or a stopped timer.
  • The certificate was renewed, but the web server, load balancer or container was never reloaded, so it keeps serving the old one.
  • A forgotten hostname: staging, an API subdomain, a mail server, a CDN origin or an internal load balancer on its own certificate.
  • A manually managed certificate whose reminder emails go to a former employee's inbox.
  • An expired intermediate certificate in the chain, or a chain that was not installed at all.

Check the certificate first

Before changing anything, confirm which certificate is being served and when it ends. The free SSL certificate checker shows the expiry date, issuer, covered hostnames and the chain for any public domain.

SSL Certificate CheckerSee when a certificate expires, who issued it and whether browsers will trust it.

From a terminal, openssl shows the same details for the exact host and port:

Print the served certificate's subject, issuer and dates
echo | openssl s_client -connect example.com:443 -servername example.com 2>/dev/null \
  | openssl x509 -noout -subject -issuer -dates

Check the notAfter date of the certificate that is served, not the file on disk. A renewed file that was never loaded does not help your visitors.

Fix an expired SSL certificate, step by step

Work through these steps in order. With an ACME client such as certbot, the whole fix usually takes minutes; a commercial certificate authority can add time for validation.

  1. 1Confirm the expiry. Run the SSL certificate checker or openssl against the exact hostname and port. Note the notAfter date, the issuer and the hostnames the certificate covers.
  2. 2Check every hostname. Test the apex domain, www, API, staging, mail and any load balancer or CDN origin. Each may use a different certificate with a different expiry date.
  3. 3Find out why renewal failed. Read the ACME client logs and the cron job or systemd timer that runs it. Look for failed HTTP or DNS challenges, changed web roots, firewall rules or, for commercial certificates, a lapsed validation or payment.
  4. 4Renew or reissue the certificate. Run the ACME renewal. For a commercial authority, generate a new CSR, complete domain validation and download the certificate together with its intermediate chain.
  5. 5Install the full chain. Serve the leaf certificate plus intermediates (the fullchain file), point the server at the new certificate and key paths and make sure the private key matches the certificate.
  6. 6Reload the server. Test the configuration, then reload nginx, Apache or HAProxy, or restart the container or load balancer. A renewed file is not served until the process reloads it.
  7. 7Verify from the outside. Re-run the checker, open the site in a private window and test each hostname and API client. Clear any CDN or load balancer certificate cache that still serves the old one.
  8. 8Add expiry monitoring. Create an SSL monitor with alerts at 30, 14 and 7 days before expiry and send it to your on-call schedule so a failed renewal is caught early.

Renewal commands for a typical Linux server

If you use Let's Encrypt with certbot and nginx, these commands cover renewal and reload. Apache and HAProxy follow the same pattern: renew, test the configuration, then reload.

Renew and reload (certbot + nginx)
sudo certbot certificates          # list certificates and their expiry dates
sudo certbot renew --dry-run       # test the renewal without changing anything
sudo certbot renew                 # renew certificates that are close to expiry
sudo nginx -t && sudo systemctl reload nginx   # serve the renewed certificate

Managed platforms such as Cloudflare, Vercel, Netlify or cloud load balancers renew automatically. If the certificate on one of them expired anyway, the usual reason is a DNS or domain-validation record that changed. Fix the record and re-trigger issuance from the dashboard.

Stop it from happening again

  • Automate issuance and renewal with ACME, and reload the server in a deploy hook so a renewed certificate is always served.
  • Keep an inventory of every hostname and who owns it, including staging, APIs and CDN origins.
  • Monitor expiry from the outside. Alerts at 30, 14 and 7 days give you time to fix a broken renewal before customers notice.
  • Route expiry alerts to the on-call schedule, not to one person's email.
  • Re-run the SSL certificate checker after every certificate or infrastructure change.

Never get surprised by an expired certificate again

OnCallKeeper checks your certificates and pages around the clock and alerts the on-call engineer well before expiry. Create free SSL and uptime monitors in a few minutes.

Related free tools

Frequently asked questions

Is it safe to click through the browser warning on an expired certificate?

For visitors, the connection is still encrypted, but the browser can no longer verify the site's identity, so they should not enter passwords or payment details. As the site owner, treat it as an outage: your customers will see the warning and many will leave.

How long does it take to fix an expired SSL certificate?

With an ACME client such as certbot, usually a few minutes: renew, reload, verify. Commercial certificates can take longer if the authority needs to re-validate your domain or organization, so renew them well before the end date.

Why does my site still show an expired certificate after I renewed it?

Common reasons are that the web server or load balancer was never reloaded, another node or the CDN still serves the old certificate, a different hostname uses a separate certificate, or the new certificate was installed without its intermediate chain.

How do I stop SSL certificates from expiring?

Automate renewal with ACME, reload the server in a deploy hook and monitor certificate expiry externally with alerts at 30, 14 and 7 days. Send those alerts to a shared on-call schedule rather than a single inbox.

Does an expired SSL certificate hurt SEO?

Visitors are blocked by a warning and crawlers may fail to fetch your pages over HTTPS, so a long outage can cost traffic and rankings. A certificate that is fixed within hours rarely causes lasting damage.

Sources

Stop firefighting. Start responding.

Join 3,200+ engineering teams who replaced PagerDuty, Better Stack and Opsgenie with one fast, modern, developer-friendly platform.

No credit card · 14-day trial of paid features · Cancel anytime