How to Fix an Expired SSL Certificate on Your Website
A site I help with went dark on a Sunday morning in March. Not down, exactly. The server was fine, the pages were there, but every visitor hit a full-page red warning saying the connection was not private, with a button marked Back to...

A site I help with went dark on a Sunday morning in March. Not down, exactly. The server was fine, the pages were there, but every visitor hit a full-page red warning saying the connection was not private, with a button marked Back to safety and a small link to proceed that almost nobody clicks. The owner found out from a customer, about nine hours in.
The cause was an SSL certificate that had expired four days earlier, after eighteen months of renewing itself quietly in the background. Nothing had been hacked and nothing had broken on the site. One scheduled job had stopped running and nobody noticed, because a certificate gives you no warning at all until the instant it stops working. Here is how to confirm that is your problem, how to fix it today, and how to stop the same silence happening again.
Confirm it is the certificate and not something else
Start with the error text, because browsers are specific and the wording tells you which of several different problems you have.
| What the browser says | What it means | Where to fix it |
|---|---|---|
| NET::ERR_CERT_DATE_INVALID | Certificate has expired, or your own clock is wrong | Renew the certificate; check the server date first |
| NET::ERR_CERT_COMMON_NAME_INVALID | Certificate is valid but issued for a different name | Reissue covering both the bare domain and the www version |
| NET::ERR_CERT_AUTHORITY_INVALID | Self-signed, or a missing intermediate certificate | Install the full chain your provider supplies |
| Not fully secure, padlock with a warning | Certificate is fine, some assets load over HTTP | A mixed content problem, not an expiry one |
| Site cannot be reached, no certificate error | Server or DNS problem | Hosting, not SSL |
Only the first row is an expiry. If you landed on the fourth, our walkthrough on fixing mixed content warnings is the one you want instead.
To see the actual dates, click the padlock or warning icon in the address bar, then the certificate details. You get a Valid from and Valid to date. If you have shell access, this one line gives you the same answer without a browser, with your own domain in place of the variable:
echo | openssl s_client -connect "$DOMAIN:443" -servername "$DOMAIN" 2>/dev/null | openssl x509 -noout -dates
One thing to rule out before you touch anything on the server. If only your own computer shows the error and other devices are fine, check your system clock. A clock that is wrong by more than a day will reject perfectly valid certificates, and I have watched people spend an afternoon on a server that was never broken.
Getting the site back up
On most small sites the certificate is free, issued by Let's Encrypt, and renewal is a single action. The route depends on how your host is set up.
If you have cPanel, look for SSL/TLS Status. Tick your domains and press Run AutoSSL. It takes between one and ten minutes and the page updates when it finishes. Plesk has the same thing under SSL/TLS Certificates with a Renew button. Managed WordPress hosts usually keep it under a Domains or Security tab, and on those the fix is often a support ticket rather than a button, which is worth knowing before you spend twenty minutes hunting.
If the server runs certbot directly, run a dry run first so a failure does not count against the rate limit, then the real thing, then reload the web server. A failed renewal almost always prints the reason in plain English in the last ten lines of its output, and that reason is the actual problem you need to solve.
The four causes I run into most often, in order:
Port 80 closed. Certificate validation usually works by the authority fetching a file from your site over plain HTTP. If a firewall change or a new security plugin blocked port 80, renewal fails every time while the site itself looks perfectly healthy on HTTPS.
A redirect that catches too much. A rule that sends everything to HTTPS or to a new path will also redirect the validation request to the hidden .well-known folder. Add an exception for that path and renewal starts working again.
DNS moved. If you changed nameservers, switched to a proxy service, or added a CAA record that names a different certificate authority, validation will be refused. A CAA record pointing at the wrong authority is the quietest version of this and the hardest to spot.
The scheduled job stopped. Server rebuilt, cron wiped, or a systemd timer disabled during an upgrade. This is what happened on the March site, and it is why the next section matters more than this one.
Why I stopped recommending longer certificates
The usual reaction to an expiry incident is to buy a paid certificate with a one year term, on the reasoning that fewer renewals means fewer chances to fail. Plenty of hosts will sell you exactly that, and I used to think it was sensible. I now think it makes an outage more likely, not less.
The argument is about practice rather than paperwork. A 90 day certificate renews roughly six times a year, usually attempting at 60 days. If the mechanism breaks, it breaks within two months of the last time it worked, while the configuration is still recent and someone still remembers it. A one year certificate is a task you perform once, from memory, on a server you have probably changed since, after eleven months of not thinking about it. The failure mode is not a broken script, it is a person who has forgotten the steps and a renewal email that went to a mailbox nobody reads.
There is also a direction of travel here. The bodies that set the rules for browsers and certificate authorities have been shortening maximum certificate lifetimes for years, and the plan is for them to get considerably shorter again through the late 2020s. Any process that depends on a human doing it annually is already living on borrowed time.
Where a paid certificate genuinely earns its price is when you need a wildcard across many subdomains, when you want organisation validation so the certificate names your registered company, or when a client contract specifies a warranty. Those are real reasons. Avoiding automation is not one of them.
Make the next expiry impossible to miss
Three layers, and they take about twenty minutes in total to set up.
First, monitor the certificate rather than the site. Most free uptime monitors include an SSL expiry check; switch it on and set the warning to 14 days rather than the default, which is often 7 and leaves no room for a weekend. The point is to get told while renewal still has time to retry on its own. Our guide to free uptime monitoring for a small website covers which checks to add and how to keep the alerts worth reading.
Second, confirm the automation is actually alive. Knowing a certificate is valid today tells you nothing about whether the renewal job still runs. Look at when the last successful renewal happened, and if that date is older than the certificate's issue date minus 60 days, something has already stopped. On a Linux server the renewal log is the file to read, not the certificate.
Third, fix the email address. Certificate authorities send expiry notices to whatever address was used at issue, which on an inherited site is often a developer who left in 2023. Point it at a shared mailbox that more than one person opens.
A note on cost while the site is down: search engines treat a certificate error page as a failure rather than content, so a multi-day expiry can pull pages out of results, and recovery is slower than the outage. That part is not instantaneous either way, which is another argument for the 14 day warning.
FAQ
How long does it take to fix an expired SSL certificate?
Usually between two and fifteen minutes once you know the cause. AutoSSL and certbot both issue in under a minute; the time goes on finding out why the automatic renewal failed in the first place.
Will my site stay online with an expired certificate?
The server keeps serving, but browsers show a full-page block that most visitors will not click past, so in practice the site is unreachable. Treat it as an outage.
Do I need to pay for an SSL certificate?
No. Free certificates from Let's Encrypt and similar authorities give identical encryption and are trusted by every current browser. Pay only for wildcard coverage, organisation validation or a contractual warranty.
Could an expired certificate mean my site was hacked?
Rarely, but a certificate that was replaced rather than expired is worth a second look, as are unexpected changes to DNS records. If other things look wrong too, work through the signs in our note on telling whether your website has been hacked.
More in Maintenance and Security
Maintenance and Security
How to Stop Spam Comments Without Killing Real Ones
The first spam comment on a site I built for a friend's bike repair shop arrived nine days after launch, before the site had a...
Maintenance and Security
How to Update PHP Version Safely on a Small Website
Your hosting dashboard shows a yellow warning that your site runs on an outdated PHP version, and you are worried that trying...
Maintenance and Security
How to Set Up Two-Factor Authentication on Your Website
Most small websites that get broken into are not hacked through clever code.