← Back to all articles

Cloudflare Error Code 526: Invalid SSL Certificate

by Unknown Proxies

8 min read

Updated October 17, 2026

Error code 526 "Invalid SSL certificate" means Cloudflare could not validate the SSL certificate on the website's origin server, so it refused to connect. Two things must both be true: the site uses Full (strict) SSL/TLS mode, and the origin certificate fails Cloudflare's checks.

If you are a visitor: the fix is on the website's side. Wait and try again later, or tell the site owner. Your browser and your connection are fine.

If you own the site: the origin certificate must meet all of these Full (strict) requirements:

Cloudflare's docs (last updated October 2026) list the same checks. Fix the one that fails. Switching the SSL/TLS mode from Full (strict) to Full also removes the error, but it turns off certificate validation. Use it only as a short-term step.

Diagram showing Cloudflare rejecting an invalid origin SSL certificate

If you see error 526 on a site you are visiting

You may see "Error 526 Invalid SSL certificate" on a Cloudflare page, or Chrome's "This page isn't working. If the problem continues, contact the site owner. HTTP ERROR 526". Both mean the same thing. The website's server has a certificate that Cloudflare does not accept.

This often happens on government services and ID portals, for example during NID validation, after a certificate expires. Only the site's operator can fix it.

What you can do:

  1. Wait some time and reload. The error ends as soon as the operator installs a valid certificate.
  2. Check the site's official social accounts or news for an outage notice.
  3. Contact the site's support with the URL, the time, and the Ray ID shown on the error page.

Clearing your cache, changing browsers, or using a VPN or proxy does not fix a 526. The failed check happens between Cloudflare and the site's server, not on your device.

"526 no reason phrase" and other forms of the error

526 is a Cloudflare status code, not a standard HTTP code. HTTP/2 and HTTP/3 responses also carry no reason phrase. So some apps and logs print "526 no reason phrase", "status 526", or "HTTP response code: 526" instead of the full name. It is the same error.

"Insecure upstream, HTTP response code: 526"

This page comes from Cloudflare Gateway, part of Cloudflare Zero Trust. Your company or school uses it to filter web traffic, often through the WARP client. Gateway shows it when it cannot open a secure connection to the destination site. Cloudflare's docs list these reasons: the site's certificate is expired, revoked, or from an unknown issuer, the name on the certificate does not match the URL, or the site does not support modern cipher suites.

If the destination site has a real certificate problem, only that site can fix it. If the site works for other people, contact your IT administrator. They manage the Gateway policies that affect the connection.

Which SSL/TLS mode shows error 526

Only one mode can return a 526. That is why changing the mode makes the error vanish.

Mode Connection to origin Origin certificate checked
Flexible HTTP on port 80 No certificate used
Full HTTPS on port 443 Not validated, self-signed works
Full (strict) HTTPS on port 443 Must be trusted or Cloudflare Origin CA, unexpired, hostname match

A 526 means the mode is Full (strict) and one of those checks failed. In Flexible mode there is no certificate to fail, and in Full mode Cloudflare accepts any certificate.

Error 526 vs. 525

Error What failed First check
525 The TLS handshake itself Port 443, certificate present, SNI, ciphers
526 Certificate validation in Full (strict) mode Expiry, trusted issuer, hostname match, chain

With 525, the connection fails before Cloudflare can use the certificate. With 526, the handshake works, and Cloudflare then rejects the certificate.

How to fix HTTP error 526 as a website owner

1. Read the certificate the origin serves

Connect to the origin IP with the real hostname. Replace 203.0.113.10 and example.com:

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

The -ext option needs OpenSSL 1.1.1 or later. Check the output against the requirements:

To see what Cloudflare would see without the origin IP, you can set the DNS record to "DNS only" (grey cloud) for a few minutes, or pause Cloudflare for the site, and run the same command against the hostname. Cloudflare's docs suggest pausing Cloudflare and running the hostname through an external SSL checker. Undo it afterwards, because the origin IP is public while the record is unproxied.

Also confirm the A record points to the server you think it does. A stale record after a migration sends Cloudflare to an old host with an old certificate, and the 526 follows.

2. Check the chain

Run the same openssl s_client command with -showcerts instead of the pipe. A publicly trusted certificate should end with Verify return code: 0 (ok). A "unable to get local issuer certificate" result usually means the origin does not send the intermediate certificate. Configure the full chain file, for example fullchain.pem from Let's Encrypt. To check a certificate file on disk, openssl x509 -noout -checkend 604800 -in cert.pem exits non-zero if it expires within seven days, which also works in a cron alert.

A Cloudflare Origin CA certificate fails this public check. That is expected. Browsers and openssl do not trust it, but Cloudflare does.

3. Fix the certificate

Pick one:

For a Cloudflare Origin CA certificate on Nginx, save the certificate and private key on the server, then point the HTTPS server block at them:

server {
    listen 443 ssl;
    server_name example.com www.example.com;

    ssl_certificate     /etc/ssl/cloudflare/example.com.pem;
    ssl_certificate_key /etc/ssl/cloudflare/example.com.key;
}

Run sudo nginx -t and then sudo systemctl reload nginx. Keep the key readable by root only. The Cloudflare Origin CA docs cover generating the certificate.

4. Check that renewal reloads the web server

The most common 526 is a renewed certificate that the web server never loaded. The files on disk are new, but Nginx or Apache still serves the old one from memory until a reload. Cloudflare then sees an expired certificate, usually on the day the old one lapses.

Run step 1 against the origin to see which certificate is live. With Certbot, sudo certbot renew --dry-run tests renewal, and a deploy hook such as --deploy-hook "systemctl reload nginx" reloads the server after each successful renewal.

5. Check every server

Intermittent 526 errors often mean one backend still serves the old certificate. Run step 1 against each backend IP.

6. Check Workers

Cloudflare Workers always use Full (strict) for external subrequests. A Worker that fetches an origin with a bad certificate can return 526 even if the zone uses Full mode. The cots_on_external_fetch compatibility flag lets those subrequests use your Custom Origin Trust Store. If the Worker code itself throws instead, Cloudflare shows error 1101, not 526.

Can proxies fix error code 526?

No. A different IP does not change the certificate on the website's server. This applies to VPNs and proxies too.

If you scrape or monitor a site and see 526, treat it as an outage on the target. Back off and retry later. Fast retries do not repair a certificate.

On ticketing and retail targets, log 526 as an origin fault, not a block. A block shows up as a 403, a challenge page, or a 1020, and those are where dedicated ISP proxies matter. See HTTP 403 Forbidden for telling the two apart.

How to prevent error 526

FAQ

What does error code 526 mean?

It means Cloudflare could not validate the SSL certificate on the website's origin server in Full (strict) mode, so it refused the connection.

How do I fix error 526 as a visitor?

You cannot. The problem is the website's certificate. Wait, reload later, or contact the site's support with the Ray ID.

What does "invalid SSL certificate error code 526" mean on a government or NID site?

The site's certificate behind Cloudflare is expired or misconfigured. Only the site operator can fix it. Try again later.

Can an expired certificate cause error 526?

Yes. An expired certificate is one of the most common causes, because Full (strict) mode rejects any certificate past its notAfter date.

Is error 526 the same as error 525?

No. Error 525 means the TLS handshake failed. Error 526 means the handshake worked, but Cloudflare rejected the certificate.

Why does error 526 come back every few months?

Short-lived certificates expire on a schedule. If automated renewal fails, or renews the files without reloading the server, the 526 returns on the expiry date. Fix the renewal hook, or switch the origin to a Cloudflare Origin CA certificate, which Cloudflare lets you issue with a long validity.

Can I fix error 526 by changing the SSL/TLS mode?

Yes, switching from Full (strict) to Full makes the error stop, because Cloudflare then skips certificate validation. It also hides expired or wrong certificates, so use it as a short-term step while you fix the origin certificate.

Final thoughts

Error 526 only appears in Full (strict) mode, so the certificate on the origin is the thing to fix. Run openssl s_client against the origin IP with the right hostname, then read expiry, issuer, and subject alternative names. If the file on disk is fine but the live certificate is old, reload the web server. Automate renewal and the reload, and monitor expiry from outside your network.

Technical reference: Cloudflare error 526 documentation.

Need clean IPs for this setup?

Static ISP proxies for steady sessions and rotating residential pools when you need fresh exits, backed by a live site list and support on Discord.

View pricing