Tutorial

SSL renewal failed: diagnose before you retry

Security & Monitoring11 min read10 steps

The browser shows a certificate warning, or a message says a renewal failed. The usual reflex is to conclude that automatic SSL is broken at the host and to retry issuance in a loop. In the vast majority of cases the mechanism works: a validation condition has changed, whether a DNS edit, a new redirect, an enabled firewall, a CAA record or a CDN proxy. This guide gives the diagnostic tree, the commands to read each signal, and where to retry once the cause is cleared.

Contents· An expired certificate does not mean a broken host1/12
  1. 01An expired certificate does not mean a broken host
  2. 02What renewal checks at every expiry
  3. 03The diagnosis in six steps
  4. 04Symptom, likely cause, fix
  5. 05When DNS points elsewhere
  6. 06When a redirect or a firewall intercepts the challenge
  7. 07When a CAA record excludes the authority
  8. 08When a CDN proxy sits in the middle
  9. 09The error messages you run into, and their cause
  10. 10Where to retry, once the cause is fixed
  11. 11Prevent rather than diagnose
  12. 12Fix the condition, not the symptom

An expired certificate does not mean a broken host

A free certificate renews by itself, with nobody clicking anything. When it expires anyway, the spontaneous conclusion is that the automatic service has failed. That is rarely true. Renewal is not an action by the host: it is a dialogue between the certificate authority and your domain, repeated at every expiry, and it succeeds only if the domain answers the way it did the first time.

But a site changes over time. Someone switched DNS servers, added a redirect rule in the .htaccess file, enabled a web application firewall, put the domain behind a CDN or published a CAA record. Each of these moves is legitimate, and each can block validation while the site keeps displaying normally. The error shows up weeks later, at expiry, far from the change that caused it. Retrying issuance without fixing anything only produces the same failure. You need to read the signal, find the condition that moved, restore it, then retry once.

What renewal checks at every expiry

To issue or renew a certificate, the authority must make sure that whoever asks controls the domain. It proceeds in four steps, and the failure is always in one of them.

First, it resolves the name: DNS must answer and return the address of the right server, over IPv4 as well as IPv6. Then, with file validation, it requests http://your-domain.com/.well-known/acme-challenge/ on port 80 and expects the exact content placed by the ACME client. Third, it looks up the domain's CAA records to check that none forbids it from issuing. Finally, it follows any redirects, but rejects an error response or a blocking page.

This sequence explains the diagnostic tree: does the domain point to the right server, is the challenge reachable, does a redirect or a firewall intercept it, does a CAA record exclude the authority, is a proxy in a compatible mode. The next steps test these five points in that order.

The diagnosis in six steps

  1. Read the real expiry date

    Do not trust a message: read the certificate that is actually served. openssl s_client -connect your-domain.com:443 -servername your-domain.com </dev/null 2>/dev/null | openssl x509 -noout -dates -issuer prints the start and end dates and the issuer. If the end date has passed, renewal really failed. If it is still valid, the warning comes from elsewhere: another domain name that is not covered, or an incomplete chain.

  2. Check where the domain points

    dig +short A your-domain.com then dig +short AAAA your-domain.com must return the address of the server hosting the site. A forgotten AAAA record pointing to an old server is a classic cause: the authority tries IPv6 first and lands on the wrong machine. Also check dig +short NS your-domain.com to confirm that the name servers are the ones where you edit the zone.

  3. Test the challenge path over HTTP

    Place a test file in the .well-known/acme-challenge/ folder of the web root, then run curl -I http://your-domain.com/.well-known/acme-challenge/test.txt. Expected: a 200 code. A 301 to HTTPS is acceptable, a 403 or a 404 is not. Add -L to follow the redirect chain and spot a loop or an unexpected destination.

  4. Identify what really answers

    Compare the response headers: the server or via field gives away a proxy, a CDN or a web application firewall in the path. If the response is an anti-bot verification page, the authority, which is not a browser, will never pass it. Also reread the .htaccess rules: a directive that denies access to files starting with a dot blocks .well-known.

  5. Read the CAA records

    dig CAA your-domain.com +short lists the authorized authorities. No answer means there is no restriction. An answer that does not name your authority, for example 0 issue "other-authority.example", forbids issuance. Also look at the parent domain: a CAA published on your-domain.com applies to all its subdomains that do not have their own.

  6. Consult the issuing client's log

    The log names the exact cause. On a VPS, certbot certificates gives the status and /var/log/letsencrypt/letsencrypt.log details every attempt. On cPanel, the AutoSSL log on the SSL Certificates page shows the domain and the reason for the failure. Note the exact message: the table below ties it to its cause.

Symptom, likely cause, fix

Scroll the table

Observed symptomLikely causeFix
Domain not resolved (NXDOMAIN)DNS zone deleted, name servers changed or record missingRestore the A record in the authoritative zone
Timeout during connectPort 80 closed or AAAA address pointing to another serverOpen port 80, fix or remove the AAAA record
404 response on the challengeDifferent web root, rewrite rule diverting the pathServe `.well-known/acme-challenge/` from the right root
403 response on the challengeWeb application firewall, hidden-file blocking, country filterExclude this path from the blocking rules
Too many redirectsLoop between HTTP, HTTPS, www and bare domainFix the redirect rule, test with `curl -IL`
CAA forbidding issuanceCAA record that does not name the authority in useAdd the authority to the CAA record or remove it
Verification page instead of the fileCDN proxy or anti-bot protection active on the pathDisable the challenge on `/.well-known/acme-challenge/`

When DNS points elsewhere

This is the most frequent cause, and the quietest. After a migration, a change of host or a zone cleanup, the domain keeps displaying thanks to the cache or a correct A record, while an AAAA record still points to the old server. The authority prefers IPv6 when it exists: it queries the old machine, which no longer knows the challenge file, and validation fails even though everything looks fine from your computer.

The check is simple: compare dig +short A your-domain.com and dig +short AAAA your-domain.com with the real address of the server. If you do not use IPv6, delete the AAAA record rather than leaving it pointing elsewhere. Also check that the domain uses the name servers where you just fixed the zone; the procedure for editing a record is detailed in the guide on adding or modifying a DNS record. Then wait for the caching delay announced by the old value to elapse before retrying.

When a redirect or a firewall intercepts the challenge

The challenge is an ordinary HTTP request that the authority sends from its own servers. Anything that answers in its place, or answers something other than the expected file, makes validation fail. Three setups regularly cause the problem.

The first is the redirect that changes domain: a rule sending all traffic from your-domain.com to another address, including the challenge path, sends the authority looking for the file on a site that does not have it. The second is the security rule that refuses files whose name starts with a dot: it protects .env or .git, but it also blocks .well-known. The third is the web application firewall or the country filter, which treats the authority as an unknown visitor and answers 403.

The fix is not to disable protection, but to exclude precisely the /.well-known/acme-challenge/ path from redirect and blocking rules. A redirect from HTTP to HTTPS remains acceptable, as long as it keeps the requested path and ends on the same domain.

When a CAA record excludes the authority

A CAA record is an allow list published in DNS: it lists the authorities allowed to issue for the domain. It is a good security tool, but it goes stale silently. Someone publishes 0 issue "an-authority.example" during an audit, then the hosting moves to another authority, or AutoSSL changes provider, and issuance is refused with a message that mentions CAA.

To fix it, read the result of dig CAA your-domain.com +short, identify the authority your service uses (on cPanel, the Issuer column of the SSL Certificates page), then add an issue line with its name. If you do not need this restriction, delete the record. Remember that a CAA is read by walking up the tree: the main domain's record applies to subdomains. And for a certificate covering a wildcard subdomain, a separate issuewild line may be needed.

When a CDN proxy sits in the middle

Putting a domain behind a CDN in proxy mode changes what the authority sees. It no longer talks to your server but to the CDN's, which may answer in your place with an edge certificate, a verification page or its own security rule. Depending on the mode chosen, renewal of the origin certificate works or does not.

Two settings matter. First, the encryption mode between the CDN and the origin: in flexible mode, the CDN talks to the origin in clear text, which causes a redirect loop if your server forces HTTPS; in strict mode, it requires a valid origin certificate, so an expiry becomes visible at once as an origin error. Second, the protections active on the challenge path: they must be lifted for /.well-known/acme-challenge/, or you can switch to validation by DNS record, which does not depend on web traffic. During diagnosis you can also temporarily disable the proxy on the single record concerned, retry issuance, then re-enable it.

The error messages you run into, and their cause

  • DNS problem: NXDOMAIN looking up A — the name does not resolve: missing zone, modified name servers, typo in the requested domain.
  • Timeout during connect (likely firewall problem) — the authority cannot reach port 80: firewall, provider security group, or an AAAA record to a machine that is not listening.
  • Invalid response ... 404 — the server answers but cannot find the file: wrong web root, a rewrite diverting the path, or the site served by another virtual host.
  • Invalid response ... 403 — an active block: web application firewall, a rule denying hidden files, country filtering or anti-bot protection.
  • CAA record for your-domain.com prevents issuance — a CAA record does not name the authority in use; add it or remove the restriction.
  • Domain control validation failure in AutoSSL — the log reports that the domain does not point to this server or that the validation request was diverted; go back over steps 2 to 4.

Where to retry, once the cause is fixed

  1. On cPanel web hosting

    Open the Security page in cPanel, SSL Certificates tab, rerun the AutoSSL check for the domain, then reread the expiry column. The step-by-step procedure is described in the guide on checking and rerunning the SSL certificate in cPanel.

  2. On a VPS with certbot

    Test first without issuing anything: certbot renew --dry-run replays validation in a test environment. If the test passes, certbot renew really issues, then reload the web server so it serves the new file. The full setup is described in the guide to Let's Encrypt certificates on a VPS.

  3. With an automated ACME chain

    If a tool manages issuance for you, fix the cause then trigger its renewal manually just once. To make this flow reliable over time, see ACME automation with short-lived certificates.

  4. Check the result

    Rerun the openssl s_client command from the first step: the end date must have changed. Reload the site in a private browsing window, because the browser may keep the old certificate in memory.

Prevent rather than diagnose

Each time you change DNS, add a redirect, enable a firewall or move behind a CDN, immediately replay the challenge test with curl -I. Monitoring the expiry date, with an alert as the deadline approaches, turns a site in error into a simple ticket handled calmly. Note in the site's file which authority issues the certificate: it is the information most often missing the day a CAA blocks issuance.

Fix the condition, not the symptom

A failing renewal almost always means that a validation condition has changed: the name no longer points to the right place, the challenge path is blocked or diverted, an authority is excluded, a proxy has slipped between it and the server. The reading order is constant: DNS resolution, access to port 80, response on the challenge path, CAA record, proxy mode. Once the cause is restored, a single retry is enough. ServOrbit.com web hosting includes free SSL renewed automatically; when validation fails, the cause can be read in the AutoSSL log and fixed with the commands above.

SSL that renews without supervision

ServOrbit.com web hosting plans include a free SSL certificate, issued and renewed automatically. If a validation fails, the AutoSSL log shows the cause and the diagnosis is documented step by step.

Need help?

Browse our help center and FAQ, or reach our team — callback, WhatsApp or email. Support in French, English and Arabic.

Message us on WhatsAppopens in a new tab