How to Fix an Expired TLS Certificate

An expired certificate breaks HTTPS for every visitor. This guide walks through confirming expiry, renewing the certificate, installing the full chain, and reloading your server safely — plus how to prevent it from happening again.

1

Confirm the certificate is expired

Before renewing, verify which certificate is being served and when it expired. The TLS tool shows expiry dates, the issuer, and the full chain.

From the command line, connect to the server and read the certificate dates:

openssl s_client -connect example.com:443 -servername example.com < /dev/null 2>/dev/null \
  | openssl x509 -noout -dates

The output shows notBefore and notAfter. If notAfter is in the past, the certificate is expired and needs immediate renewal.

2

Renew the certificate

The renewal method depends on how your certificate is issued:

3

Install the full certificate chain

This is the step most often done incorrectly. Install the leaf certificate and all intermediate certificates in order — not just the leaf.

A chain that ends at the leaf without the intermediates will fail on clients that do not cache intermediates. Most browsers are lenient, but many API clients, mobile apps, and curl will reject an incomplete chain with a certificate verification error.

Your CA or certbot will provide a full-chain file (often named fullchain.pem). Use that file, not the bare certificate file (cert.pem).

In nginx, point ssl_certificate at the full chain file:

ssl_certificate     /etc/letsencrypt/live/example.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/example.com/privkey.pem;
4

Reload the web server

Reload the server configuration to pick up the new certificate. A reload is non-destructive — it does not drop active connections. This is different from a restart.

nginx:

nginx -s reload

Apache:

apachectl graceful

If you are using a process manager like systemd, systemctl reload nginx or systemctl reload apache2 also performs a non-destructive reload.

5

Verify the new certificate

Run the TLS tool again on your domain. Confirm the new expiry date is in the future, the issuer is correct, and the chain is complete and trusted.

You can also verify with openssl:

openssl s_client -connect example.com:443 -servername example.com < /dev/null 2>/dev/null \
  | openssl x509 -noout -dates -issuer

Check the browser padlock for the same confirmation. If the browser still shows an expired certificate, clear the browser's certificate cache or test in a private window.

6

Prevent recurrence: automate renewal and add monitoring

Certificate expiry is entirely preventable with two steps:

Inspect a certificate with the TLS tool →