cloudflare 2026-12-02 ⏱ 3 min read

Fix Cloudflare Error 526

Fix Cloudflare Error 526
Quick Answer: Cloudflare error 526 appears when your SSL mode is Full (Strict) and the certificate on your origin server is expired, self-signed, issued for another hostname, or missing its intermediate chain. Install a valid certificate on the origin (a free Let's Encrypt or Cloudflare Origin CA certificate works) and the error goes away.

Cloudflare error 526: what it means

In Full (Strict) mode Cloudflare connects to your origin over HTTPS and checks the certificate the same way a browser would. If that check fails, visitors see "Error 526: Invalid SSL certificate". The problem is on the origin, not at Cloudflare's edge, so changing browsers or clearing your cache will not help.

Cloudflare error 526: the usual causes

CauseHow to spot itFix
Expired certificate"notAfter" date is in the pastRenew and reload the web server
Self-signed certificateIssuer equals subjectReplace with a CA-issued or Origin CA certificate
Hostname mismatchYour domain is missing from the certificate namesReissue with the correct domain and subdomains
Missing intermediateChain shows only one certificateServe the full chain file, not just the leaf
Wrong vhost answersAnother site's certificate is returnedCheck server_name or ServerName and SNI

Test the origin directly

Ask the origin for its certificate, bypassing Cloudflare. Replace the IP and domain with your own:

openssl s_client -connect ORIGIN_IP:443 -servername example.com -showcerts < /dev/null 2>/dev/null | openssl x509 -noout -subject -issuer -dates -ext subjectAltName

Check that the dates are valid, the names include your domain, and the issuer is a real CA (or Cloudflare Origin CA). Then run openssl s_client ... -verify_return_error if you want OpenSSL to fail loudly on chain problems. You can also check the public side of your site with the SSL checker, though remember that it sees Cloudflare's certificate, not your origin's.

Fix it

  1. Get a valid certificate. Either issue a free Let's Encrypt certificate on the server, or create a Cloudflare Origin CA certificate in the dashboard under SSL/TLS, then Origin Server. Origin CA certificates are trusted by Cloudflare only, which is fine as long as the domain stays proxied.
  2. Install the full chain. In Nginx use the fullchain file for ssl_certificate:
server {
    listen 443 ssl;
    server_name example.com www.example.com;
    ssl_certificate     /etc/letsencrypt/live/example.com/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/example.com/privkey.pem;
}
  1. Reload the server (nginx -t && systemctl reload nginx) and re-run the OpenSSL test.
  2. Check that the key matches. If you installed a new certificate by hand, confirm the pair with the key matcher.

Do not "fix" it by dropping to Flexible

Switching to Flexible mode hides the error, but traffic between Cloudflare and your server then travels unencrypted, and it often creates redirect loops if your origin forces HTTPS. If you need a stopgap while you sort out the certificate, Full (non-strict) accepts an untrusted certificate. Treat that as temporary and return to Full (Strict) once the origin is fixed.

When it is not the certificate

  • Port 443 blocked: a firewall that drops Cloudflare's IP ranges usually gives a 521 or 522, not a 526.
  • Handshake failure: if the origin cannot agree on a protocol or cipher with Cloudflare you may see error 525 instead. The TLS checker helps confirm which TLS versions your origin offers.
  • Recent DNS change: confirm the record points to the right server with the DNS lookup tool.

Related reading: Cloudflare SSL errors, Cloudflare Origin certificates and certificate not trusted.

Frequently Asked Questions

What is the difference between error 525 and 526?

525 means the TLS handshake between Cloudflare and the origin failed. 526 means the handshake worked but the certificate did not pass validation in Full (Strict) mode.

Does a self-signed certificate work with Full (Strict)?

No. Full (Strict) needs a certificate from a trusted CA or a Cloudflare Origin CA certificate.

Will a Cloudflare Origin CA certificate work in a browser?

Not if a visitor reaches your origin directly. It is only trusted by Cloudflare, so keep the site proxied.

How long until the error clears after I fix it?

Usually right away once the origin serves the correct certificate. If it persists, purge the Cloudflare cache and retest the origin with OpenSSL.

🔒 Test Your Website SSL Certificate Now
Run Free SSL Check →

✅ Post-Installation Verification & SEO Checklist

After applying the steps above, run through this 5-point checklist to prevent browser warnings and protect your Google SEO rankings:

  • Verify full CA chain trust and TLS 1.3 support using our Live SSL Checker.
  • Scan for Mixed Content HTTP links and check HSTS/CSP headers on Security Headers Checker.
  • Enforce a permanent 301 HTTP-to-HTTPS redirect with our HTTPS Redirect Generator.
  • Confirm both root and www versions resolve cleanly to one canonical HTTPS URL.
  • Verify your HTTPS property and sitemap.xml inside Google Search Console and Bing Webmaster Tools.
Technically Reviewed by TryFreeSSL Security Team
Last updated: 2026-12-05
About Us →

Free SSL Certificates, Live SSL Checker & CSR Generator

Issue trusted Let's Encrypt SSL certificates in 60 seconds with zero server setup.

Related Articles

🤖 TryFreeSSL AI Assistant