Cloudflare returns a 526 when it reached your origin over HTTPS but couldn't validate the certificate the server sent. It only happens in Full (strict) mode, which checks the origin certificate the way a browser would.
Quick answer. The certificate on your origin is expired, self-signed, missing its intermediate certificates, revoked or issued for another hostname. Replace it with one from a trusted authority, or install a free Cloudflare Origin CA certificate, which Full (strict) accepts.
Is a 526 error my fault?
| Where the problem is | How often |
|---|---|
| Your origin certificate | Yes |
| Cloudflare | Validates it |
| The visitor | No |
The invalid certificate is on your origin. Cloudflare is doing what Full (strict) asks: refusing a certificate it can't trust. Another browser or network won't help; the certificate has to change.
526 vs 525
Both involve HTTPS between Cloudflare and your origin, but they fail at different points. A 525 means the TLS handshake couldn't finish: no certificate at all, no shared cipher or port 443 closed. A 526 means the handshake worked, Cloudflare looked at the certificate and rejected it. With a 525 Cloudflare never saw a usable certificate; with a 526 it saw one and didn't trust it.
In plain Full mode Cloudflare accepts any certificate, so a 526 can't happen there.
Why a certificate is invalid
- It expired. This is the most common cause and the easiest to prevent: a renewal cron job failed, Let's Encrypt auto-renewal stopped or a manually installed certificate was forgotten.
- It's self-signed. No trusted authority issued it, so Full (strict) refuses it. This happens when someone turns on Full (strict) for a server that only ever had a self-signed certificate.
- The chain is incomplete. The server sends its own certificate without the intermediate that links it to a trusted root. Some clients fill the gap; Cloudflare doesn't. Install the full chain file (often
fullchain.pem). - The hostname doesn't match. The certificate's common name or subject alternative names don't include the domain Cloudflare asks for, for example a certificate for
www.example.comonexample.com. - It was revoked by the authority that issued it, for example after a reissue, and the old certificate is still installed.
How to check the certificate
- See what the origin sends, without Cloudflare:
openssl s_client -connect ORIGIN_IP:443 -servername yourdomain.com. The output shows the dates, the issuer, the subject and the chain. - Make sure the chain includes the intermediate certificates and doesn't stop at a single self-signed one.
- Check that your domain appears in the subject or the subject alternative names.
- Cloudflare also suggests pausing Cloudflare for the hostname and running it through an SSL checker. Our SSL checker shows the expiry date, the issuer, the names covered and whether the chain is complete.
How to fix it
The quickest lasting fix is a Cloudflare Origin CA certificate: create it in the dashboard under SSL/TLS, Origin Server, Create Certificate. It's free, can be valid for up to 15 years and Full (strict) accepts it, so the expiry, chain and trust problems of public certificates don't apply to this connection. If you keep a self-signed certificate, Cloudflare can trust it through its Custom Origin Trust Store. If you use a public authority, install the full chain and make sure auto-renewal works, since a failed renewal causes most 526s.
Get alerted before the certificate expires
An expired certificate is the most predictable outage there is. Tick Enable SSL expiry check on a failover.io HTTPS monitor and you get a heads up at 30 days, the full alert chain at 7 days and repeated alerts at 1 day. More in the SSL expiry guide.
Other Cloudflare 5xx errors
- Cloudflare error 520: Web server returned an unknown error
- Cloudflare error 521: Web server is down
- Cloudflare error 522: Connection timed out
- Cloudflare error 524: A timeout occurred
- Cloudflare error 525: SSL handshake failed
All six codes side by side: Cloudflare 5xx errors explained.
Frequently asked questions
What does Cloudflare error 526 mean?
In Full (strict) mode, Cloudflare reached your origin over HTTPS but couldn't validate its certificate: it's expired, self-signed, missing intermediates, revoked or for another hostname.
How do I fix Cloudflare error 526?
Check the origin certificate with openssl s_client or an SSL checker, then replace it with one from a trusted authority and install the full chain. A free Cloudflare Origin CA certificate is the simplest lasting fix.
What causes an invalid SSL certificate error?
An expired certificate, a self-signed one, a missing intermediate certificate, a revoked certificate or a certificate that doesn't list the hostname you visit.
Why does error 526 only happen in Full (strict) mode?
Full (strict) checks the origin certificate like a browser does. Plain Full accepts any certificate, so it never produces a 526.