← Tous les articles

“Your connection is not private” on your website: understanding SSL certificate errors and fixing them (complete guide)

Visitors see a red warning instead of your site? How to pinpoint the exact cause (expired certificate, wrong name, incomplete chain, CDN), fix it properly, and make sure it doesn't happen again.

"Your connection is not private" on your website: understanding SSL certificate errors and fixing them (complete guide)

Key points

  • “Your connection is not private” means the browser rejected your site’s certificate: expired, issued for another name, missing its chain, or misconfigured at the CDN. The error code under the message tells you which.
  • A handful of commands show what the server really sends, so you don’t have to rely on your host’s dashboard.
  • The lasting fix is organisational: know who renews the certificate, check that automatic renewal works, and monitor the expiry date.

It’s Monday morning and a client calls: “Our site shows a red page, Chrome says the connection isn’t private, and customers are emailing to say we’ve been hacked.” Almost every time, nothing has been hacked: the site’s SSL certificate is simply no longer accepted by browsers. For visitors, though, that distinction doesn’t exist. They get a full-screen security warning and a “Back to safety” button, and they leave. Forms stop arriving, the shop stops selling, and anything that talks to your site automatically (payment providers, apps, partners) often fails without telling anyone. This guide follows the process we use on real call-outs: read the error, check what the server actually sends, fix the cause for your kind of hosting, then put the safeguards in place so you’re not caught out again.

What the warning really says (and what it doesn’t)

When you open an https:// address, the site presents a certificate: a file signed by a recognised certificate authority, vouching that this server is entitled to answer for this domain. The browser checks three things: the certificate is within its validity period, it was issued for the exact name you typed, and it can be traced through a chain of intermediate certificates up to an authority the browser trusts. If any check fails, you get the warning.

The headline is identical for everyone, but the error code in small print below it (or under “Advanced”) tells you which check failed. It’s the first thing to ask whoever reports the problem, ideally with a screenshot.

  • NET::ERR_CERT_DATE_INVALID (Chrome, Edge) or SEC_ERROR_EXPIRED_CERTIFICATE (Firefox): the certificate has expired, or the visitor’s device clock is wrong.
  • NET::ERR_CERT_COMMON_NAME_INVALID or SSL_ERROR_BAD_CERT_DOMAIN: the certificate is valid, just not for this name. Typically it covers example.com and the visitor typed www.example.com, or the host is serving another site’s certificate.
  • NET::ERR_CERT_AUTHORITY_INVALID or SEC_ERROR_UNKNOWN_ISSUER: the browser doesn’t trust the issuer. Either the certificate is self-signed (the default one on a freshly installed server) or the intermediate certificate is missing from the configuration.
  • ERR_SSL_PROTOCOL_ERROR or ERR_SSL_VERSION_OR_CIPHER_MISMATCH: browser and server can’t even set up the encrypted connection. That’s a server or CDN configuration issue rather than a certificate one.

What the warning doesn’t say is that data has leaked or the site has been tampered with. It only says the browser can’t prove it’s talking to the right server. That’s exactly why you should never tell customers to “just click Proceed anyway”: you’d be training them to ignore the very warning that protects them from a genuine fake site. And if your site sends HSTS (a header that enforces HTTPS), browsers won’t even offer that button.

Is it your site, or the visitor’s device?

Before touching the server, we rule out the visitor’s side. It’s the less common cause, but missing it wastes hours, because everything looks fine from the office.

  • The device clock. A laptop or phone whose date is several days off sees every certificate as expired or not yet valid. Giveaway: other sites fail too.
  • Antivirus or a corporate proxy inspecting HTTPS. Some security software swaps sites’ certificates for its own. When its setup breaks, only that company’s machines are affected.
  • Public Wi-Fi (hotels, stations) intercepting the connection to show its login page: the error vanishes once the visitor signs in to the portal.

The fastest test: open the site on a phone using mobile data with Wi-Fi switched off. If the error shows there too, the problem is on the site’s side. For an independent view, an online SSL checker (Qualys SSL Labs is the best known) tests your domain from outside and flags an incomplete chain, a missing name or an outdated protocol.

Check what the server actually sends

Hosting dashboards regularly say “certificate active” while browsers say otherwise. We’ve seen it more than once: a renewed certificate on a web server that was never reloaded and keeps serving the old one; a certificate installed for a domain that, since a migration, is served by a different machine. The only truth is what the server sends when you ask it. From any terminal (macOS, Linux, or WSL on Windows):

# 1. Validity dates, covered names and issuer of the certificate actually served
echo | openssl s_client -connect www.example.com:443 -servername www.example.com 2>/dev/null 
  | openssl x509 -noout -subject -issuer -dates -ext subjectAltName

# 2. Is the chain complete? You want "Verify return code: 0 (ok)"
echo | openssl s_client -connect www.example.com:443 -servername www.example.com 2>/dev/null 
  | grep -E '^ *[0-9] s:|Verify return code'

# 3. What a strict HTTP client sees (APIs, tools, some phones)
curl -sSI https://www.example.com/ -o /dev/null && echo "Certificate accepted"

# 4. And the bare domain, which plenty of visitors still type
curl -sSI https://example.com/ -o /dev/null && echo "Certificate accepted (bare domain)"

The first command shows the subject, the issuer, the notBefore and notAfter dates and, most importantly, the list of covered names (Subject Alternative Name). Modern certificates are checked against that list, not the old “CN” field. If www.example.com isn’t listed, visitors using www will get the error even though the bare domain works.

The second shows the chain the server sends. A single 0 s: line and a verify code other than 0 means the server sends only the site certificate, without the intermediate. Desktop browsers sometimes paper over this by fetching the intermediate themselves, which is why it “works for me” yet fails on some phones and for API calls or your providers’ webhooks. curl, which doesn’t compensate, fails with unable to get local issuer certificate.

Test every name that points at the site: with and without www, plus subdomains (shop, client area, the staging site your client can see). A failure on just one of them is enough to trigger worried calls.

Fix it according to the cause and your hosting

Expired certificate on shared or managed hosting. Most hosts provide free Let’s Encrypt certificates renewed automatically from the control panel (often labelled AutoSSL or “SSL/TLS”). If one expires anyway, renewal failed: the domain no longer points at that host (DNS changed, a CDN was added), a subdomain has no DNS record, or a security rule blocks validation. Trigger a new issue from the panel, read the error it gives, and fix the cause rather than retrying in a loop: certificate authorities rate-limit attempts.

Expired certificate on a server you run. With Certbot, four commands tell you where things stand:

# Certificates managed by Certbot and when they expire
sudo certbot certificates

# Is automatic renewal actually scheduled?
systemctl list-timers | grep -i certbot

# Simulate a full renewal without touching the live certificates
sudo certbot renew --dry-run

# The HTTP-01 challenge must reach this path over plain HTTP, on port 80.
# A 404 from the server is fine; a 403, a timeout or a redirect
# to another domain explains a failed renewal.
curl -I http://www.example.com/.well-known/acme-challenge/test

The causes we meet most: a firewall or .htaccess rule blocking /.well-known/ (some hardening rules deny every path starting with a dot); a migrated site where the old server still runs the renewal job and the new one has none; a successful renewal on a web server that was never reloaded. For the last one, add a deploy hook that reloads Nginx or Apache after every renewal, e.g. --deploy-hook "systemctl reload nginx".

Wrong name. Reissue a certificate covering every name in use, at minimum with and without www, then pick one primary address and redirect the other. On Nginx it looks like this:

server {
    listen 443 ssl;
    # Both names must be in the certificate (SAN field)
    server_name example.com www.example.com;

    # fullchain.pem = certificate + intermediate(s).
    # With cert.pem alone, some browsers cope and others don't.
    ssl_certificate     /etc/letsencrypt/live/example.com/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/example.com/privkey.pem;

    # One public address: redirect the bare domain
    if ($host = example.com) {
        return 301 https://www.example.com$request_uri;
    }

    root /var/www/example/public;
}

Incomplete chain. The server must send the site certificate followed by the intermediates. With Let’s Encrypt, point to fullchain.pem, not cert.pem. With a purchased certificate, the vendor supplies a “bundle” or “CA” file to append after the certificate, or to paste into the dedicated field in your host’s panel.

Site behind a CDN such as Cloudflare. There are now two certificates: the one the CDN shows visitors, and your server’s, which the CDN checks. Cloudflare’s 525 (SSL handshake failed) and 526 (invalid SSL certificate) errors are about the second: your origin certificate has expired or doesn’t match, while “Full (strict)” mode requires it to be valid. “Flexible” mode sends traffic unencrypted between CDN and server and frequently causes redirect loops with WordPress; we don’t recommend it.

Once fixed, re-run the checks above, clear caches (caching plugin, CDN), and on WordPress make sure both addresses under Settings › General start with https://. If the padlock still looks broken with a valid certificate, that’s a different issue: images or scripts still loaded over http://, i.e. mixed content.

Why it happens even with automatic renewal

“But it was automatic!” is the line we hear most. Renewal is automatic; its success isn’t. It depends on conditions that change without anyone thinking about the certificate: a DNS edit, a migration, a CDN, a new agency, a new security rule.

Two changes make this more pressing. First, Let’s Encrypt stopped sending expiry reminder emails in 2025. Plenty of site owners found out about failed renewals from those emails, and that safety net is gone. Second, the shared rules between certificate authorities and browsers (the CA/Browser Forum) are cutting maximum certificate lifetimes in stages, down to a planned 47 days in 2029. Shorter lifetimes leave less time to notice a failing renewal and make manual renewals unworkable.

Paid certificates bring a different risk: renewal is often manual and tied to an account with a reseller, sometimes opened by a former agency or an employee who has since left. Unless something specific requires it (some contracts or internal policies demand an OV certificate), a free, automatically renewed certificate gives you the same encryption and the same browser trust. On our projects we only keep a paid certificate when a constraint justifies it, and its renewal goes in the maintenance calendar with a named owner.

Monitor it so you’re never surprised again

Certificate monitoring takes minutes to set up. Nearly every uptime monitoring service offers a pre-expiry alert: enable it for each name (with and without www, subdomains) and send it to an address more than one person reads. On a server you manage, a small daily script does the same job:

#!/bin/sh
# check-certs.sh: warn when a certificate is invalid or expires within 21 days
THRESHOLD=$((21 * 24 * 3600))
for domain in example.com www.example.com shop.example.com; do
  if ! echo | openssl s_client -connect "$domain:443" -servername "$domain" 2>/dev/null 
       | openssl x509 -noout -checkend "$THRESHOLD" >/dev/null 2>&1; then
    echo "WARNING: certificate for $domain invalid, unreachable or expiring within 21 days"
  fi
done

# In the crontab, with MAILTO set, to get the output by email:
# 15 7 * * * /usr/local/bin/check-certs.sh

Twenty-one days isn’t a magic number. It leaves time to fix things before visitors notice, while Let’s Encrypt’s automatic renewal normally kicks in well before that. If the alert fires, a renewal has already failed at least once, which is precisely what you want to know.

On the organisational side, three facts should be written down in the site’s handover document or maintenance contract: who provides the certificate (host, CDN, your own server), how it renews, and who gets the alerts. When you change agency or host, add the certificate to the cut-over checklist alongside email and DNS.

FAQ

The error only appears for some visitors. Is that normal?

It’s common, and it narrows the diagnosis. If only www or only the bare domain fails, the certificate doesn’t cover both names. If it’s mostly phones or automated tools, suspect an incomplete chain. If it’s just one company, look at their antivirus or proxy.

Is a paid certificate safer than Let’s Encrypt?

For encryption and the padlock, no: browsers treat a free certificate and a paid DV certificate the same way. OV and EV certificates also verify the organisation’s identity, which some contracts require, but browsers no longer highlight it. What really matters is how reliably it renews.

Does a certificate error hurt my SEO?

While it lasts, visitors from Google hit the warning and leave, and Googlebot may run into errors crawling the site. A short outage fixed quickly usually has no lasting effect; one that runs for days is riskier. Fix it, then keep an eye on Search Console’s crawl reports.

Expired certificate, Cloudflare 526, or a warning that comes back every few months? We find the cause, put your HTTPS back in order and set up monitoring as part of our maintenance and hosting plans.

Partager LinkedIn Facebook X WhatsApp
</>

webtestudio

Agence web : sites WordPress sur mesure, thèmes premium et logiciels SaaS.

Parler de votre projet →