Cloudflare Error 526 (Invalid SSL Certificate): Causes and How to Fix It
Quick Answer: How to Fix Cloudflare Error 526
Cloudflare Error 526 (Invalid SSL Certificate) occurs when Cloudflare attempts to connect to your origin server under Full (strict) SSL/TLS mode but cannot validate the SSL/TLS certificate presented by the origin server.

Published by TechCorner HQ Editorial Desk. Technical references reviewed against current official documentation. How we review technical content.
To permanently resolve Error 526, address the certificate validation issue on your origin web server:
- Confirm that an SSL certificate is installed on your origin server and listening on port 443.
- Verify that the certificate is issued by a publicly trusted Certificate Authority (CA) or is a valid Cloudflare Origin CA certificate.
- Ensure the certificate has not expired or been revoked.
- Verify that the certificate's Subject Alternative Names (SAN) match the requested hostname or fully qualified domain name.
- Ensure the full intermediate certificate chain is installed on the origin web server if required by your CA.
Why Cloudflare Returns Error 526
Cloudflare manages two distinct encrypted connections for HTTPS requests: one between the visitor's browser and Cloudflare's edge network, and another between Cloudflare's edge and your origin web server. When the SSL/TLS encryption mode is configured to Full (strict), Cloudflare enforces certificate validation on the origin connection.
According to official Cloudflare documentation, Error 526 occurs specifically when two conditions are met:
- The zone's SSL/TLS mode is set to Full (strict).
- Cloudflare cannot validate the SSL certificate presented by the origin web server.
If Cloudflare cannot verify trust, it drops the upstream connection and returns HTTP Error 526 to the browser. If your connection fails earlier during the TLS negotiation stage itself rather than during certificate validation, consult our guide on Cloudflare Error 525 (SSL Handshake Failed).
Common Causes of Origin Certificate Failures
Under Full (strict) mode, Cloudflare rejects origin certificates for any of the following reasons:
- Expired or Revoked Certificate: The origin certificate has passed its validity window or failed Certificate Revocation List (CRL) checks.
- Untrusted Certificate Authority: The certificate is self-signed or signed by a private Certificate Authority not present in Cloudflare's trust store.
- Hostname Mismatch: The certificate lacks the requested apex domain or subdomain in its Common Name (CN) or Subject Alternative Name (SAN) fields.
- Missing Intermediate Certificates: The web server only serves the leaf certificate, omitting intermediate CA certificates needed to establish a complete trust chain.
- Zero Trust Gateway / Strict BoringSSL Validation: When traffic passes through Cloudflare Gateway, strict certificate validation logic rejects certificates with invalid characters (such as underscores in common names) or unanchored chains.
Diagnostic Steps: Inspecting Your Origin Certificate
Before modifying web server configurations, inspect the exact certificate presented by your origin server using direct command-line diagnostics.
Query the Origin Directly
Because querying your domain directly in a standard browser routes through Cloudflare's edge proxy, use curl to query your origin IP directly while sending the correct Server Name Indication (SNI) and Host header:
curl -svo /dev/null https://example.com --connect-to example.com:443:YOUR_ORIGIN_IPReview the command output for the following verification points:
- Certificate validity dates: Confirm the certificate is currently active and not expired.
- Issuer details: Check whether the issuer is a trusted public CA or Cloudflare Origin CA.
- SAN coverage: Ensure the domain being requested matches the hostnames listed in the certificate.
How to Fix Error 526
Method 1: Install a Cloudflare Origin CA Certificate
If you do not already have an active certificate from a third-party Certificate Authority (such as Let's Encrypt or DigiCert), generate a free Cloudflare Origin CA certificate. These certificates are trusted directly by Cloudflare for proxied traffic and can be issued for validity periods up to 15 years.
- Log in to the Cloudflare dashboard and select your domain.
- Go to SSL/TLS > Origin Server.
- Select Create Certificate.
- Choose your private key type (RSA or ECC) and confirm your domain hostnames and wildcards (e.g.,
example.com,*.example.com). - Select a validity period and choose Create.
- Copy the generated Origin Certificate and Private Key to separate files on your server. Keep the private key secure; it is not displayed again after exiting the screen.
- Install the certificate and private key files in your origin web server configuration (such as NGINX, Apache, or IIS) and ensure port 443 is open and listening.
Method 2: Install Complete Certificate Chains for Public CAs
If you use a publicly trusted Certificate Authority, ensure that your web server is configured to deliver the complete certificate bundle, including any intermediate CA certificates. A missing intermediate certificate prevents Cloudflare's edge from validating the trust path to the root authority, resulting in Error 526.
Method 3: Temporary Fallback (Emergency Availability)
If immediate site restoration is necessary while you generate or deploy an updated origin certificate, you can temporarily switch the encryption mode in the Cloudflare dashboard:
- In the Cloudflare dashboard, navigate to SSL/TLS > Overview.
- Change the mode from Full (strict) to Full.
Security Warning: Full mode encrypts connections between Cloudflare and your origin server, but it does not validate the origin certificate against a trust store. This allows self-signed or invalid certificates to connect temporarily. You should reinstall a valid certificate and return the mode to Full (strict) as soon as possible.
Verification and Post-Fix Checks
After installing your origin certificate and reloading your web server software:
- Verify that your web server service is running and listening on port 443 without configuration syntax errors.
- Set the SSL/TLS encryption mode in Cloudflare back to Full (strict) under SSL/TLS > Overview.
- Open a browser session and request the domain over HTTPS.
- Confirm that the page loads with an HTTP 200 status code and that the Cloudflare 526 error page no longer appears.