How to Fix SSL Certificate Expiry and Trust Errors

This check reads the TLS certificate your site serves on port 443. It fails if there is no certificate, if the handshake breaks, if the certificate is not trusted, or if it expires within 14 days, and it warns between 14 and 30 days. By the end of this guide you will have a valid, fully trusted certificate with more than 30 days left, automatic renewal you have tested, and an alert that reaches you before it can lapse again.

By Updated ⏱ 20 minutes🎯 Beginner● High impactTechnical
Illustration: SSL certificate expiry fix guide
TECHNICAL · FIX GUIDE SSL certificate expiry IMPACTEFFORT TIME20 minutes LEVELBeginner

Why it matters

An expired or untrusted certificate makes Chrome, Safari and Firefox show a full-page "Your connection is not private" warning. Most visitors leave at that point. Googlebot and AI crawlers cannot fetch pages over a failed handshake, so pages can drop out of search results and AI answers.

Payment widgets, APIs and webhooks that call your domain stop working. Since March 2026, publicly trusted certificates are limited to 200 days, dropping to 100 days in 2027 and 47 days in 2029. Renewing by hand will soon not be practical.

✕BeforeCertificate expires in 9 days(2026-03-21), or: Certificate nottrusted: unable to verify the first✓AfterCertificate expires in 87 days(2026-06-05). The full chain istrusted, auto-renewal passed a dry run

What you need

Admin access to your hosting panel, CDN or website builder, or SSH access with sudo rights to your server
Access to your domain's DNS settings, in case validation fails
A terminal with openssl, or any online SSL checker
An email address or chat channel that receives expiry alerts

Step-by-step fix

1

Check what your site is serving right now

Look at the live certificate before you change anything. The command below shows the expiry date (notAfter), the issuer and the hostnames the certificate covers. com`, because each name can serve a different certificate.

If the connection is refused or the handshake fails, your server has no working HTTPS listener on port 443.

text
echo | openssl s_client -connect example.com:443 -servername example.com 2>/dev/null | openssl x509 -noout -subject -issuer -dates -ext subjectAltName
Pro tip: Always pass `-servername`. Without it, a shared server may return its default certificate instead of yours.
2

Find out who issues and renews the certificate

The issuer line tells you where to make the fix:

  • Let's Encrypt (R10–R14, E5–E9) or ZeroSSL: usually Certbot, acme.sh, cPanel AutoSSL or your host's panel.
  • Google Trust Services or Cloudflare: your CDN issues the edge certificate.
  • Sectigo, DigiCert or GoDaddy: often a paid certificate that someone installed by hand. These are the ones that expire without warning.

If a CDN or website builder issues the certificate, skip to platformNotes. You usually only need to fix DNS or click renew.

Pro tip: Write down who owns the certificate and when it was last renewed. Expiry outages usually happen because the one person who knew has left.
3

Renew the certificate now if it has under 30 days left

On a server running Certbot, renew straight away and reload the web server. If you get a validation error, check two things. The domain's A and AAAA records must point to this server.

well-known/acme-challenge/` must not be redirected to another host or blocked. For a paid certificate, generate a new CSR, reissue the certificate in the vendor's dashboard and install the new files. Do this before the old certificate expires.

text
sudo certbot certificates
sudo certbot renew --cert-name example.com --force-renewal
sudo systemctl reload nginx   # or: sudo systemctl reload apache2
Pro tip: If the site has no certificate at all, issue one with `sudo certbot --nginx -d example.com -d www.example.com` or `--apache`.
4

Fix trust errors: chain and hostname

A certificate can be in date and still fail the trust test. The two usual causes:

  • Missing intermediate. The error reads "unable to verify the first certificate". Point your server at fullchain.pem, not cert.pem. Some browsers fill in a missing intermediate on their own, but crawlers and API clients do not.
  • Hostname mismatch. The error reads "Hostname/IP does not match certificate's altnames". Reissue the certificate so it covers every name you serve, such as example.com and www.example.com.

Self-signed certificates and Cloudflare Origin CA certificates are not publicly trusted. Never expose them directly to visitors.

nginx
# Nginx
ssl_certificate     /etc/letsencrypt/live/example.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/example.com/privkey.pem;

# Apache 2.4.8+
SSLCertificateFile    /etc/letsencrypt/live/example.com/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/example.com/privkey.pem
Pro tip: Run `sudo nginx -t` or `sudo apachectl configtest` before reloading, so a typo does not take the site down.
5

Turn on and test automatic renewal

Certbot installs a systemd timer, or a cron job, that runs twice a day. By default it renews when fewer than 30 days remain. Do three things:

  • Confirm the timer exists.
  • Run a dry run to prove that validation works.
  • Add a deploy hook so the web server reloads and actually serves the new certificate.

This audit warns below 30 days. conf`. Note that this only works while your certificates last 90 days.

If you move to shorter-lived certificates, use Certbot's default timing (or ARI) instead.

text
systemctl list-timers | grep certbot
sudo certbot renew --dry-run
sudo certbot reconfigure --cert-name example.com --deploy-hook "systemctl reload nginx"
Pro tip: Keep Certbot up to date (version 4.x or later). Newer versions support ACME Renewal Information (ARI), which lets the certificate authority ask for an early renewal if a certificate has to be revoked.
6

Set up independent expiry monitoring

Let's Encrypt stopped sending expiry warning emails in June 2025, so you need your own alert. Most uptime tools have an SSL expiry check: set the alert at 21 days or more. If you have a server you can use, the script below runs daily from cron and emails you when fewer than 21 days remain.

Watch every hostname you serve, including www, any subdomains and API hosts.

text
#!/bin/sh
# /etc/cron.daily/ssl-expiry-check
for host in example.com www.example.com; do
  end=$(echo | openssl s_client -connect "$host:443" -servername "$host" 2>/dev/null | openssl x509 -noout -enddate | cut -d= -f2)
  days=$(( ( $(date -d "$end" +%s) - $(date +%s) ) / 86400 ))
  [ "$days" -lt 21 ] && echo "$host certificate expires in $days days" | mail -s "SSL expiry: $host" ops@example.com
done
Pro tip: Send alerts to a shared inbox or team channel, not one person's mailbox.
7

Verify the fix from outside your network

Run the openssl command from step 1 again. Confirm that notAfter is more than 30 days away and that the names under subjectAltName include every host you serve. Then check the chain: the second command below should end with Verify return code: 0 (ok).

Finally, run the audit again. It should report the new expiry date with no trust error.

text
echo | openssl s_client -connect example.com:443 -servername example.com 2>/dev/null | openssl x509 -noout -dates
echo | openssl s_client -connect example.com:443 -servername example.com -verify_return_error 2>&1 | grep "Verify return code"

Platform-specific notes

WordPress (cPanel / managed hosting)

WordPress does not manage certificates; your host does. In cPanel, open Security > SSL/TLS Status, select your domains and click Run AutoSSL. On managed hosts, look for a setting such as SiteGround's Security > SSL Manager or WP Engine's Domains > SSL. If renewal fails, the domain usually points to another IP or sits behind a proxy that blocks validation. After switching to HTTPS, set both WordPress Address and Site Address under Settings > General to https://.

Shopify, Wix and Squarespace

Certificates are issued and renewed automatically, and you cannot upload your own. If the audit fails, check that DNS is correct. On Shopify, go to Settings > Domains: the A record should be 23.227.38.65 and www should be a CNAME to shops.myshopify.com. On Wix, use the DNS records under Domains. Remove any old AAAA records or CAA records that block the platform's certificate authority, then wait up to 48 hours for the certificate to be reissued.

Cloudflare

When the proxy (orange cloud) is on, visitors and this audit see Cloudflare's edge certificate. Check it under SSL/TLS > Edge Certificates; Universal SSL renews it automatically. Set SSL/TLS > Overview to Full (strict). Your origin can use a Cloudflare Origin CA certificate (valid for up to 15 years), but it is only trusted behind the proxy. If you switch the proxy off, visitors will get a trust error.

Vercel, Netlify and Webflow

Certificates are issued and renewed automatically once the domain is verified. If renewal stalls, the dashboard shows a DNS or verification warning: Vercel under Project > Settings > Domains, Netlify under Domain management > HTTPS, Webflow under Site settings > Publishing. Fix the records it lists, then click Renew certificate or Verify DNS configuration.

Nginx / Apache on a VPS

Use Certbot or acme.sh as described in the steps above. If you run Docker or a load balancer, make sure the renewed files reach the container or balancer that terminates TLS. Reloading the host's Nginx does nothing if Traefik, Caddy or an AWS ALB serves the certificate. On AWS, ACM renews certificates automatically only while DNS validation records stay in place.

Check that it worked

✅ How to verify

  • The openssl -dates command shows notAfter more than 30 days in the future for both example.com and www.example.com.
  • openssl s_client with -verify_return_error reports Verify return code: 0 (ok), which confirms the full chain is trusted and the hostname matches.
  • sudo certbot renew --dry-run (or your platform's SSL panel) completes without errors.
  • A re-run of the audit shows the certificate passing with its new expiry date.

⚠️ Common mistakes

  • Renewing the certificate but never reloading the web server, so the old certificate stays in memory until it expires.
  • Installing cert.pem instead of fullchain.pem. Browsers may fill in the missing intermediate on their own, but crawlers and API clients reject the certificate as untrusted.
  • Covering only example.com and forgetting www.example.com or other subdomains, which causes a hostname mismatch on those URLs.
  • Relying on certificate authority reminder emails. Let's Encrypt no longer sends them, and paid vendors often email someone who has left the company.

Is this still an issue on your site? Run a free audit — ZORO checks this and 294 other SEO, AI-visibility, accessibility and security signals, with fixes for your platform.

Check my site free

FAQ

What happens when an SSL certificate expires?

Browsers block the page with a security warning. Most visitors leave, crawlers cannot fetch the page, and forms, checkouts and API calls to the domain fail. Your site is still online, but in practice it cannot be reached until you install a valid certificate.

How often do Let's Encrypt certificates need renewing?

Let's Encrypt certificates are valid for 90 days. Certbot renews them when about 30 days remain. Let's Encrypt is gradually moving to shorter lifetimes, so rely on automatic renewal rather than a calendar reminder.

Why does my certificate show as valid in Chrome but untrusted in SSL checkers?

Your server is usually not sending the intermediate certificate. Chrome can fetch a missing intermediate itself, so the page loads. Strict clients, such as SEO crawlers, Node.js and many APIs, do not, so they reject the connection. Serve fullchain.pem to fix it.

Do I need to buy a paid SSL certificate?

Not for encryption or for SEO. Free certificates from Let's Encrypt, ZeroSSL, Google Trust Services or your host are trusted by every major browser. Paid OV or EV certificates give no ranking benefit, and certificates you install by hand are the ones most likely to expire unnoticed.