Fix the certificate Cloudflare rejects on your server

Cloudflare error 526 means Cloudflare reached your origin server over HTTPS but couldn't validate the certificate it presented, so it refused to send the request. It shows up in Full (strict) mode, where Cloudflare requires a valid certificate on the origin. The certificate has expired or been revoked, is self-signed, doesn't list your hostname, or arrives without the intermediate certificates Cloudflare needs to build a trusted chain.

What Cloudflare checks on the origin's certificate

  • It hasn't expired

    Today's date has to fall between the certificate's start and end dates.

  • A trusted authority issued it

    Cloudflare accepts certificates from a publicly trusted authority or from its own Origin CA. A self-signed certificate fails unless you upload it to Cloudflare's custom origin trust store, which needs Advanced Certificate Manager and makes Cloudflare trust only what you upload.

  • It names your hostname

    The hostname Cloudflare requests, with or without www, has to match the certificate's Common Name or a Subject Alternative Name, either exactly or through a wildcard that covers it.

  • The chain is complete

    The server has to send its own certificate together with any intermediate certificates, so Cloudflare can trace a path to a trusted root.

  • It hasn't been revoked

    A certificate its authority has revoked fails validation even when its dates and names are fine.

Cloudflare's error 526 guide lists these checks, and its Full (strict) page gives the certificate requirements for that mode. The trust store page gives its requirements, and the Origin CA docs describe wildcard coverage.

Inspect the certificate your origin sends

# Show the subject, issuer, dates and hostnames of the certificate at your origin (203.0.113.10 here)
openssl s_client -connect 203.0.113.10:443 -servername yoursite.com </dev/null 2>/dev/null \
  | openssl x509 -noout -subject -issuer -dates -ext subjectAltName

# Count the certificates the origin sends; for a public authority's certificate, 1 usually means the intermediates are missing (an Origin CA certificate has none)
openssl s_client -connect 203.0.113.10:443 -servername yoursite.com -showcerts </dev/null 2>/dev/null \
  | grep -c 'BEGIN CERTIFICATE'

Read what openssl prints

  • Compare notAfter with today's date, check that the issuer is a public authority or Cloudflare's Origin CA, and look for your hostname on the subjectAltName line. A certificate that names only www.yoursite.com fails for requests to yoursite.com, and the other way around.

  • Other tools won't trust a Cloudflare Origin CA certificate even though Cloudflare does: Cloudflare's Origin CA docs note that visitors see untrusted certificate errors if they reach such an origin without Cloudflare in front. Judge one of these by its dates and names, not by whether your own client accepts it.

How to fix Cloudflare error 526

  1. Renew an expired origin certificateRenew it, reload the web server so it serves the new file, and check why automatic renewal stopped. The certificate visitors see at Cloudflare keeps working, so a lapsed one on the origin goes unnoticed until this error appears.
  2. Replace a self-signed certificateInstall a certificate from a public authority or from Cloudflare's Origin CA. Uploading a self-signed certificate to Cloudflare's custom origin trust store also works, but it needs Advanced Certificate Manager, and Cloudflare then stops trusting public authorities for the zone.
  3. Cover every proxied hostnameReissue the certificate with each hostname Cloudflare connects to in its Subject Alternative Name list, including the www form and any subdomains.
  4. Serve the full chainPoint the web server at the file that holds your certificate followed by its intermediates, often named the full chain, rather than at the certificate alone.

Frequently asked questions

Why do visitors get a 526 when my padlock looks fine?

Visitors connect to Cloudflare, which serves its own certificate for your domain, so their padlock reflects that certificate. The 526 is about the second connection, from Cloudflare to your server, where your origin's certificate failed. Cloudflare's encryption modes page describes the two connections.

Should I switch from Full (strict) to Full to fix a 526?

Only as a stopgap. Cloudflare's guide offers it as a quick fix, but Full mode doesn't validate the origin's certificate in any way, and Cloudflare's Full mode page warns that this lets an attacker who can intercept the connection present their own certificate. Fix the certificate and stay on strict mode.