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
# 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 certbotFixes
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.
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
- Is Cloudflare down? Live status: checked every few minutes, with outage history.
- SSL certificate checker: Expiry date, issuer, chain and host name match.
- Website down checker: Is it down for everyone or just me? Check any site now.
Related reading
- ERR_BAD_SSL_CLIENT_AUTH_CERT: how to fix it: Fix ERR_BAD_SSL_CLIENT_AUTH_CERT: client certificates that are expired, untrusted or not selected, mutual TLS settings and corporate device certificates.
- Cloudflare error 523: origin is unreachable: Fix Cloudflare error 523 Origin is Unreachable: wrong DNS IPs, routing problems at the host and firewalls, with tests that confirm where traffic stops.
- SSL handshake failed: causes and fixes: Why TLS handshakes fail: expired or mismatched certificates, missing intermediates, old protocols and SNI issues, with openssl commands to diagnose each cause.
- NET::ERR_CERT_COMMON_NAME_INVALID: how to fix it: Fix NET::ERR_CERT_COMMON_NAME_INVALID: certificates missing www or a subdomain, wrong SNI defaults and CDN misconfiguration, with commands to check SANs.
- Cloudflare error 1016 "Origin DNS error": how to fix it: Fix Cloudflare error 1016 Origin DNS error: CNAME records pointing to names that do not resolve, deleted origins and load balancer pools, with checks.
- NET::ERR_CERT_AUTHORITY_INVALID: how to fix it: Fix NET::ERR_CERT_AUTHORITY_INVALID: self-signed certificates, missing intermediates and antivirus interception, with openssl commands to verify the chain.
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.