Skip to content

Troubleshooting guide

Cloudflare error 526: invalid SSL certificate

A 526 means Full (strict) mode is doing its job: Cloudflare connected to your origin and refused to trust the certificate it found.

3 min read11 sectionsUpdated

On this page

Key points

  • Only Full (strict) validates the origin certificate.
  • Expired origin certificates are the most common cause.
  • A Cloudflare Origin CA certificate satisfies strict mode.
  • Do not downgrade to Full to silence the error.

What 526 means

In strict mode, Cloudflare requires a valid certificate on the origin: unexpired, matching the hostname, and signed by a CA it trusts, which includes its own Origin CA. The handshake completed, but this validation failed.

Common causes

  • The origin certificate expired. Renewal failed, and nobody noticed because visitors see Cloudflare's certificate.
  • Self-signed certificate with strict mode turned on.
  • Hostname not covered by the certificate's names.
  • An incomplete chain, missing the intermediate.

Diagnose it

Check the certificate presented by the origin itself, not through Cloudflare.

bash
# Dates, subject and issuer of the ORIGIN certificate
openssl s_client -connect 203.0.113.10:443 -servername example.com </dev/null 2>/dev/null \
  | openssl x509 -noout -dates -subject -issuer -ext subjectAltName

# Chain verification
openssl s_client -connect 203.0.113.10:443 -servername example.com </dev/null 2>/dev/null | grep 'Verify return'

# Certbot renewals on this host
sudo certbot certificates
systemctl list-timers | grep -i certbot

Fixes

Renew an expired certificate and reload the web server. For long-lived simplicity, install a Cloudflare Origin CA certificate, valid for up to 15 years. Reissue the certificate if the hostname is missing. Serve fullchain.pem, so the intermediate is included. If Let's Encrypt HTTP-01 renewal fails behind Cloudflare, switch to the DNS-01 challenge.

How the SSL modes differ

Cloudflare's encryption mode decides what is checked between its edge and your server. Flexible uses plain HTTP to the origin, so there is no encryption on that leg. Full uses HTTPS but accepts any certificate, including an expired one. Full (strict) requires a valid certificate and is the only mode that protects against someone impersonating your origin. A 526 can therefore appear immediately after someone turns on strict mode, even though nothing on the server changed: the certificate was already invalid, and now it is being checked.

After fixing the certificate, purge nothing and change nothing else. Reload the web server, then request the page again and confirm the response comes from your origin by checking its headers.

Catch it automatically

The trap is that public certificate checks stay green, because they see Cloudflare's certificate. Point an SSL expiry check at the origin hostname or IP as well, so you hear about expiry weeks ahead rather than on the day.

Frequently asked questions

Can I fix 526 by switching to Full?

That hides it, because Full does not validate the certificate. Keep strict mode and fix the certificate.

Do visitors see my origin certificate?

No, they see Cloudflare's. The origin certificate only secures traffic between Cloudflare and your server.

Why did 526 appear suddenly?

The most likely reason is an origin certificate that expired, often after a silent renewal failure.

Check it now, free

Watch your own site and services with VitalRix

Uptime checks, APM, logs, real-user monitoring, alerts and status pages in one place. Every product has a free tier and no credit card is needed.