troubleshooting 2026-12-02 ⏱ 3 min read

Fix Cloudflare SSL Errors (525, 526)

Fix Cloudflare SSL Errors (525, 526)

Cloudflare shows numbered errors when it cannot complete a connection to your origin server. Most are caused by the SSL mode not matching the certificate on the origin, or by the origin refusing or dropping the connection. Start with the error code in the table.

Cloudflare SSL errors: what each error means

CodeMeaningFirst thing to check
525SSL handshake with the origin failedDoes the origin listen on 443 with a certificate and TLS 1.2 or later?
526Invalid SSL certificate on the origin (Full strict)Expired, wrong name, self-signed or missing chain
520Unknown or empty response from the originOrigin crashed, firewall dropped the request, headers too large
521Origin refused the connectionWeb server down or Cloudflare IPs blocked
523Origin unreachableWrong IP in DNS, routing problem
522Connection timed outServer overloaded or firewall silently dropping

Check the SSL mode

In the dashboard, open SSL/TLS and Overview. Full (strict) needs a valid certificate on the origin: a public CA certificate or a Cloudflare Origin certificate. Full accepts a self-signed one. Flexible does not use HTTPS to the origin at all, but it can cause redirect loops, covered in this guide.

Cloudflare SSL errors: fix 525

  1. Confirm port 443 is open to the internet: nc -vz ORIGIN_IP 443.
  2. Confirm the server has an SSL virtual host with a certificate. A server with only port 80 configured causes 525 under Full modes.
  3. Check protocol support. Cloudflare needs TLS 1.2 or higher at the origin. Use the TLS checker on the origin hostname.

Fix 526: invalid certificate

Run the SSL checker against the origin. The usual causes are:

  • The certificate expired.
  • The names do not include the hostname Cloudflare requests.
  • An intermediate certificate is missing from the chain.
  • The certificate is self-signed while the mode is Full (strict).

Replace or renew the certificate, or install the full chain. Some control panels need the CA bundle pasted separately.

Fix 520 and 521

For 521, restart the web server and make sure the firewall allows Cloudflare's published IP ranges, since some security plugins and fail2ban rules ban them. For 520, read the origin error log, look for crashes and oversized headers or cookies, and test the origin directly from a machine that bypasses Cloudflare.

Test the origin directly

curl -vk --resolve example.com:443:ORIGIN_IP https://example.com/

This connects to the origin with the right hostname, skipping Cloudflare. If this fails, the issue is the origin, not Cloudflare.

DNS checks

If the record points to the wrong IP, errors like 523 appear. Verify with the DNS lookup and make sure the proxied record matches the real origin address.

Keep errors from coming back

Set the SSL mode on purpose and write it down. Monitor the origin certificate's expiry separately from the edge certificate, because Cloudflare renews its own edge certificates but not the one on your server. Allow Cloudflare IP ranges in your firewall and any rate-limiting tool, and test the origin directly after each server update.

Related reading: error 526, Universal SSL against Let's Encrypt and Always Use HTTPS.

Frequently Asked Questions

Can I fix 526 by switching to Flexible?

It hides the error but sends traffic between Cloudflare and your server unencrypted. Fix the certificate instead.

Why did it start suddenly?

Usually a certificate expired, a renewal failed or a firewall update blocked Cloudflare.

Are 52x errors from Cloudflare or my host?

Cloudflare displays them, but the cause is almost always on the origin side.

🔒 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