Remediation Guide 11 min read

Fix SSL Certificate Errors — Hostname, Chain & Expiry

Browsers show 'Your connection is not private', NET::ERR_CERT_DATE_INVALID, NET::ERR_CERT_COMMON_NAME_INVALID, or NET::ERR_CERT_AUTHORITY_INVALID when an SSL certificate cannot be verified. Wrong-hostname SSL errors happen when the certificate Subject Alternative Name list does not cover the domain users type in the address bar — a common vulnerability when redirects, www/apex pairs, or CDN bindings drift. Partial chain errors (including 'the remote certificate is invalid because of errors in the certificate chain: PartialChain') mean the server presents the leaf without required intermediates. This guide identifies which error you have, provides the correct fix for hostname mismatch, chain, and expiry issues, and shows how to verify the repair on the live public endpoint.

What This Means

SSL certificate errors fall into four categories, each requiring a different fix. (1) Expired certificate (NET::ERR_CERT_DATE_INVALID): the validity window has passed — renew and deploy the full leaf-plus-chain bundle, then confirm automated renewal is working. (2) Hostname mismatch (NET::ERR_CERT_COMMON_NAME_INVALID): the certificate Subject Alternative Name list does not cover the domain users are accessing — reissue with correct SAN entries including www, apex, and any redirect targets. (3) Broken certificate chain (NET::ERR_CERT_AUTHORITY_INVALID): the server presents the leaf certificate without the required intermediate certificates — install the complete CA-provided bundle at every TLS termination layer. (4) Serving layer mismatch: a CDN, proxy, or load balancer continues presenting an old certificate after the origin is updated — rebind the new certificate at each TLS-terminating edge. Always test against the live public hostname, not a private origin IP, to see the exact error your users are experiencing.

SignalWhat to verifyWhy it matters
ExpiryCertificate validity window and renewal job statusExpired certs cause immediate browser trust failure.
Hostname mismatchCN and SAN coverage for the live hostnameTrust fails even with a valid cert if coverage is wrong.
Chain trustIntermediate bundle presentation at the edgeMissing intermediates create inconsistent browser trust.
Serving layerCDN, load balancer, or origin ownershipThe wrong layer may still present the old certificate.

Common Causes

Patterns worth checking first

  • Renewal drift: Automation exists but failed after DNS, ACME, or permissions changed.
  • Wrong certificate bound: A CDN, proxy, or load balancer still points at an older certificate pair.
  • Incomplete chain: The edge serves the leaf cert without the needed intermediates.

How To Confirm It Safely

Confirmation steps

  • Check the live hostname from the public edge, not only the origin server.
  • Confirm the exact hostname users reach, including www and alternate subdomains.
  • Inspect the certificate chain returned by the public endpoint.
  • Review expiry timing and the real renewal path before replacing files.

Fix Workflow

  1. Identify the serving layer. Determine whether the problem lives at origin, CDN, or load balancer.
  2. Replace the leaf and chain together. Upload the correct bundle rather than swapping only one file.
  3. Validate hostname coverage. Confirm the SAN list includes every public host tied to the route.
  4. Retest the public edge. Run the checker again and confirm trust, expiry, and chain details.

Implementation Examples

OpenSSL check from a public client
openssl s_client -connect example.com:443 -servername example.com -showcerts

Rollout Risks

A healthy origin does not guarantee the CDN is fixed

CDNs and edge proxies often terminate TLS separately from the origin.

  • Retest the public hostname through the same route users hit.
  • Check whether regional or cached edge behavior still serves the old certificate.
Renewal fixes can still leave hostname mismatch behind

A renewed certificate that omits the right SANs still fails production traffic.

  • Validate alternate hosts too.
  • Review redirect hostnames before closing the issue.

Validation Checklist

Post-fix validation

  • The live hostname presents the intended certificate and chain.
  • Expiry dates match the newly issued certificate, not the old one.
  • No hostname mismatch remains for the public domain or critical alternates.
  • The SSL Certificate Checker confirms the expected trust posture.

FAQ

How do I fix 'Your connection is not private' in Chrome?

Chrome shows 'Your connection is not private' (NET::ERR_CERT_AUTHORITY_INVALID or similar) when the TLS certificate cannot be verified. The fix depends on the specific error code shown.

  • If the error is NET::ERR_CERT_DATE_INVALID, the certificate has expired — renew and redeploy the full chain.
  • If the error is NET::ERR_CERT_COMMON_NAME_INVALID, the certificate does not cover the hostname — reissue with the correct SAN entries.
  • If the error is NET::ERR_CERT_AUTHORITY_INVALID, the CA is not trusted or the intermediate chain is missing — install the full bundle from your CA.
  • Always test against the live public hostname, not localhost or a private IP, to see the same error your users see.
Why does my browser say "Your connection is not private"?

That warning means the browser cannot establish trusted HTTPS to the hostname you opened.

  • Common causes include expired certificates, hostname mismatches, and incomplete intermediate chains.
  • Start by checking the live public hostname—not a private origin IP or staging URL.
How do I fix NET::ERR_CERT_DATE_INVALID?

This error means the certificate is expired or not yet valid for the current date.

  • Renew or reissue the certificate, then upload the new leaf and full chain to the serving layer.
  • Confirm automated renewal jobs and DNS/ACME permissions still work after the fix.
How do I fix a hostname mismatch (NET::ERR_CERT_COMMON_NAME_INVALID)?

The certificate SAN list does not include the hostname in the browser address bar.

  • Reissue the certificate with correct CN and SAN entries for www, apex, and any alternate hosts.
  • Check redirects that send users to a host not covered by the certificate.
How do I fix an expired Let's Encrypt certificate?

Let's Encrypt certificates expire every 90 days. If auto-renewal broke, the most common causes are DNS changes, ACME challenge path misconfigurations, and permission issues on the renewal script.

  • Run `certbot renew --dry-run` to test renewal without issuing a certificate and identify the failure reason.
  • Check that the ACME challenge path (/.well-known/acme-challenge/) is publicly reachable on port 80.
  • After renewal, reload or restart the web server so it picks up the new certificate files.
  • Confirm the new expiry with the SSL checker — the old certificate can remain cached at a CDN edge even after the origin is updated.
How do I fix ERR_SSL_PROTOCOL_ERROR?

ERR_SSL_PROTOCOL_ERROR means the TLS handshake failed before the certificate was even presented. This is usually a server configuration problem, not a certificate problem.

  • Check that the server supports TLS 1.2 or TLS 1.3 — older TLS 1.0 and 1.1 are disabled in modern browsers.
  • Verify the server is listening on port 443 and that no firewall is blocking the connection.
  • If the error appears only in one browser, clear SSL state in browser settings and retry.
  • Use the TLS Deep Analysis tool to inspect cipher suite and protocol support from the public edge.
How do I fix an incomplete certificate chain?

The server presents the leaf certificate without the required intermediate certificates.

  • Install the full chain bundle from your CA at the TLS termination layer.
  • Retest with openssl s_client or the Vulnify SSL checker from outside your network.
How do I fix "the remote certificate is invalid because of errors in the certificate chain: PartialChain"?

PartialChain means the client received the leaf certificate but could not build a trusted path to a root CA — usually because intermediate certificates are missing from the server response.

  • Download the full chain bundle (leaf plus intermediates) from your certificate authority — not just the .crt file.
  • Install the complete bundle at every TLS termination point: origin web server, load balancer, and CDN edge.
  • Retest with openssl s_client -showcerts or the Vulnify SSL checker from a network outside your infrastructure.
  • If the error appears only on mobile or one browser, clear local trust caches after confirming the public edge serves the full chain.
How do I fix an SSL certificate with wrong hostname?

A wrong-hostname SSL error (NET::ERR_CERT_COMMON_NAME_INVALID) means the certificate does not list the hostname users access in its Subject Alternative Names.

  • Reissue the certificate with correct CN and SAN entries for apex, www, and any redirect targets.
  • Check CDN and load balancer bindings — they may still serve an older certificate for that hostname.
  • Verify redirects do not send users to a host not covered by the certificate.
  • Retest the live public URL with the Vulnify SSL checker after rebinding the new certificate.
Is it safe to click "Proceed anyway" past an SSL error?

No. Bypassing an SSL warning means accepting an untrusted or invalid connection. Data sent over that connection is not protected by a valid certificate.

  • Attackers on the same network can intercept traffic when TLS is bypassed — this is a real risk on public Wi-Fi.
  • The only safe response to an SSL error on a production site is to fix the certificate, not bypass the warning.
  • If you are debugging locally and see this on localhost or a staging URL, that is expected — use a self-signed cert in your dev environment.
Should I replace only the leaf certificate?

Not unless you are certain the intermediate bundle is already correct.

  • Most production fixes are safer when the full bundle is updated together.
  • Retest chain presentation after the change.
Can a CDN hide the real certificate problem?

Yes. The origin can be healthy while the public edge still serves an older or different certificate.

  • Check CDN and proxy bindings separately.
  • Always validate the public route users actually reach.