Cloudflare Error 526 can appear even when an SSL certificate is installed on your hosting server and the Cloudflare dashboard shows an active HTTPS certificate. The problem is that Cloudflare can not validate the certificate presented by the origin server when it attempts to establish a secure connection.
This commonly happens when the origin serves an expired certificate, presents a certificate for the wrong hostname or has an incomplete certificate chain. It can also happen after a certificate renewal if the web server continues serving the previous certificate or another origin is configured incorrectly.
To fix Cloudflare Error 526, identify the certificate Cloudflare actually receives from your origin, determine why it fails validation and correct that certificate or its server configuration. Do not replace certificates or weaken SSL validation until you have identified the failing condition.
Check the Certificate Cloudflare Receives
The first thing to establish is whether the certificate installed in your hosting dashboard is the same certificate your origin server presents during an HTTPS connection. A certificate can exist in the hosting account without being active on the website's HTTPS listener.
This distinction is especially important when several websites share one server or a domain uses multiple origins. Testing the wrong destination may show a valid certificate while leaving the actual cause of Error 526 undiscovered.
Confirm the Affected Hostname
Open the affected website and record the hostname that returns Error 526. For example, example.com and www.example.com are different hostnames and a certificate covering one may not cover the other.
Next, open Cloudflare and check SSL/TLS → Overview to confirm whether the website uses Full (strict) encryption. Under this mode, Cloudflare validates the origin certificate separately from the certificate presented to visitors at Cloudflare's edge.
Installing a valid edge certificate does not satisfy the origin certificate requirement. The origin must present a certificate that meets Cloudflare's strict verification conditions.
Identify the Actual Origin
Open DNS → Records in your Cloudflare dashboard and inspect the affected hostname. If the record is proxied, public DNS lookups normally return Cloudflare addresses rather than the origin's actual IP address.
Use the configured DNS destination, hosting control panel or origin infrastructure details to identify the correct server. Before testing, check whether a configured load balancer or supported Origin Rule directs the request to another destination.
For example, Cloudflare may show an A record pointing to one server while an Enterprise Origin Rule sends matching requests to a different backend. Testing only the DNS record's server would not reveal the certificate presented by the actual destination.
Record the affected hostname, intended origin address and any relevant routing overrides. These details determine which certificate must be inspected and help prevent changes to an unrelated server.
Inspect the Served Certificate
If you administer the origin server or have permission to test it directly, OpenSSL can show the certificate presented during an HTTPS connection. Suppose your website is app.example.com and its origin IP address is 203.0.113.10.
Run the following command from a system with OpenSSL installed:
openssl s_client \
-connect 203.0.113.10:443 \
-servername app.example.com \
-showcerts </dev/nullReplace the example hostname and documentation IP address with your actual values before running the command. The -connect option selects the destination server, while -servername sends the intended hostname through Server Name Indication, or SNI.
This matters because an HTTPS server can present different certificates depending on the requested hostname. Inspect the output for the certificate subject, issuer, validity information, certificate chain and verification messages.
A successful TLS connection does not necessarily mean the certificate is valid for Cloudflare's strict verification. OpenSSL may complete the connection while reporting a certificate verification problem.
If the connection is refused or the TLS handshake fails before the certificate can be inspected, investigate the origin listener or TLS handshake separately. Those symptoms do not establish that the certificate itself failed validation.
Read the Certificate Details
Once you know which origin answers the HTTPS request, extract the details of the certificate it presents. These details help distinguish an expired certificate from a hostname mismatch, incorrect certificate selection or a trust problem.
For a concise view of the certificate's identity and validity period, run:
openssl s_client \
-connect 203.0.113.10:443 \
-servername app.example.com </dev/null 2>/dev/null \
| openssl x509 -noout -subject -issuer -dates -ext subjectAltNameThis command retrieves the first certificate presented by the origin and displays its subject, issuer, validity dates and Subject Alternative Name entries. Use these details to compare the actual certificate with the hostname that fails through Cloudflare.
For example, a server might report:
subject=CN = example.com
issuer=CN = Example Certificate Authority
notBefore=Oct 01 00:00:00 2026 GMT
notAfter=Dec 30 23:59:59 2026 GMTThe output should also include the certificate's Subject Alternative Name entries when present. These identify the DNS names the certificate covers and help determine whether the correct certificate is being served.
The most useful next action depends on which part of the certificate fails validation.
| Certificate evidence | Likely problem | Corrective action |
|---|---|---|
| Validity period has ended | Expired certificate | Renew and deploy the certificate |
| Hostname is not covered | Certificate name mismatch | Install a certificate covering the required hostname |
| Unexpected certificate appears | Wrong HTTPS virtual host or backend | Correct the server's certificate selection |
| Public certificate has missing intermediates | Incomplete certificate chain | Install the correct full certificate chain |
| Issuer is an unknown private CA | Untrusted certificate authority | Use a trusted certificate or supported trust configuration |
| Certificate authority confirms revocation | Revoked certificate | Obtain and deploy a newly issued valid certificate |
| Renewal succeeded but old certificate appears | Server still uses the previous certificate | Correct the active deployment and reload the relevant service |
Certificate revocation requires particular attention because a revoked certificate may still be within its original validity period. Check the certificate's revocation status through the issuing certificate authority or an appropriate OCSP or CRL validation procedure when supported.
The OpenSSL certificate-details command above does not establish whether a certificate has been revoked. If the issuing authority confirms revocation, replace the certificate with a newly issued valid certificate rather than attempting to reuse it.
These findings distinguish certificate-validation failures from ordinary HTTPS connectivity problems. Correct the specific condition identified by the test instead of changing unrelated DNS, caching or firewall settings.
Fix the Certificate That Failed
The Certificate Is Expired
Check the certificate's notAfter value against the current date and time. If the validity period has ended, Cloudflare can not accept that certificate under normal Full (strict) validation.
Renew the certificate through your hosting provider, certificate authority or existing certificate-management system. After renewal, confirm that the renewed certificate is deployed to the HTTPS service handling the affected hostname.
Renewing the certificate in an account does not necessarily update the certificate currently served by the web server. For example, a hosting panel may show a newly issued certificate while Nginx continues referencing an older certificate file.
After deployment, run the OpenSSL inspection again and compare the new notAfter value with the previous result. If the old date remains, check the active certificate path, server configuration and any other origin that might receive the request.
The Hostname Does Not Match
Cloudflare requires the certificate to cover the hostname it validates. Suppose visitors request https://shop.example.com but the origin presents a certificate valid only for example.com.
The certificate may be unexpired and issued by a trusted authority, yet Cloudflare can still reject it because the required hostname is missing. Inspect the Subject Alternative Name entries in the OpenSSL output to determine whether the certificate covers the intended hostname.
If shop.example.com is absent and no valid wildcard entry covers it, the origin needs an appropriately issued certificate. A certificate covering *.example.com generally covers shop.example.com but it does not automatically cover the root domain example.com or a deeper hostname such as login.shop.example.com.
Request or install a certificate containing the appropriate DNS names, then confirm that the HTTPS service presents it for the affected hostname. If the correct certificate is already installed but OpenSSL receives a different one, investigate the web server's virtual-host or SNI configuration before requesting another certificate.
The Wrong Certificate Is Served
A useful diagnostic is comparing what your hosting panel says is installed with what OpenSSL actually receives. For example, the hosting account may contain a certificate issued for app.example.com, while the server presents its default certificate for server.example.net.
This indicates that the problem may be certificate selection rather than certificate issuance. On Nginx, inspect the HTTPS server block that should handle the hostname and check its server_name, ssl_certificate, and ssl_certificate_key directives.
For an existing Let's Encrypt installation, the relevant certificate directives may resemble:
ssl_certificate /etc/letsencrypt/live/app.example.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/app.example.com/privkey.pem;These paths are examples and should not be copied unless the files actually exist in your environment. Use the certificate and private-key locations configured for the actual website.
If the server uses Apache, inspect the relevant SSL virtual host and its certificate configuration instead. On managed hosting, use the provider's supported certificate assignment controls.
After making a change, validate the server configuration before applying it. For Nginx, use sudo nginx -t and reload the service only after validation succeeds.
Retest the same origin IP and SNI hostname using OpenSSL. The certificate returned should now be the one intended for the affected website.
The Certificate Chain Is Incomplete
An origin may present a valid leaf certificate but omit one or more intermediate certificates needed to establish a trusted certificate chain. This can produce an origin certificate-validation failure even when the hostname and expiration date are correct.
Inspect the certificates returned by the earlier OpenSSL command using the -showcerts option. The output shows the certificates the server supplied during the connection.
For a conventional publicly trusted certificate, the server generally needs to present the leaf certificate and the required intermediate certificates. The trusted root certificate is normally supplied by the validating client's trust store.
If the intermediate chain is missing, obtain the correct chain from the certificate authority or hosting provider. For a Let's Encrypt installation, the fullchain.pem file commonly contains the leaf certificate and the required intermediate certificates.
Using a leaf-only certificate file where the full chain is required can leave the origin's configuration incomplete. Update the certificate-chain configuration according to the web server's supported procedure and repeat the connection test.
Confirm that the intended certificate chain is now presented but do not assume every local OpenSSL verification error proves Cloudflare will reject the certificate. The local machine and Cloudflare can have different trusted certificate authorities.
Check Certificate Trust
If the hostname, expiration date, and certificate chain appear correct, examine who issued the origin certificate. Full (strict) accepts appropriately configured certificates issued by publicly trusted certificate authorities or Cloudflare Origin CA.
Certificates issued by other private authorities require a supported trust configuration. The correct investigation depends on whether the origin uses a publicly trusted certificate, Cloudflare Origin CA or an internal certificate authority.
Publicly Trusted Certificates
If the origin should use a publicly trusted certificate, verify that it was issued by a recognized certificate authority and has the required chain. You can use OpenSSL to test hostname and trust validation from the machine running the command:
openssl s_client \
-connect 203.0.113.10:443 \
-servername app.example.com \
-verify_hostname app.example.com \
-verify_return_error </dev/nullReplace the example values with the affected hostname and intended origin. A successful verification is useful evidence that the certificate is trusted by that testing system and covers the requested hostname.
However, it does not guarantee that Cloudflare will reach the same origin or use an identical trust configuration. If the command reports a hostname mismatch, correct the certificate coverage or SNI selection.
If the result reports an unknown issuer or incomplete chain, investigate the issuing authority and the certificates presented by the origin. Do not disable verification simply to make the test succeed.
Cloudflare Origin CA Certificates
Cloudflare Origin CA certificates are designed for HTTPS connections between Cloudflare and your origin server. They are compatible with Full (strict), provided they are correctly installed, valid and cover the required hostname.
However, these certificates are not generally trusted by ordinary browsers or by a typical operating system's public CA trust store. A direct HTTPS test against an origin using Cloudflare Origin CA may therefore produce a trust warning.
That warning alone does not prove the configuration is invalid for Cloudflare. Instead, inspect the certificate's issuer, hostname coverage, validity period and actual deployment.
If the server has a valid Cloudflare Origin CA certificate but Error 526 continues, check that the origin serves the correct certificate for the intended hostname. Also verify that an expired or different certificate is not being selected by another virtual host or backend.
Avoid switching the website to DNS-only merely to inspect an Origin CA certificate in a browser. Direct visitors may encounter trust warnings because the certificate is intended for Cloudflare-to-origin traffic.
BusinessTally's existing guide on disabling Cloudflare without website downtime explains the certificate requirements and risks associated with bypassing Cloudflare's proxy.
Private Certificate Authorities
An origin may use a certificate issued by an organization's internal certificate authority rather than a publicly trusted CA or Cloudflare Origin CA. If the Cloudflare zone uses Custom Origin Trust Store, inspect its configuration under SSL/TLS → Origin Server → Custom Origin Trust Store.
This feature requires Advanced Certificate Manager and allows administrators to specify the certificate authorities Cloudflare trusts for origin authentication. However, its behaviour differs from simply adding another trusted CA to Cloudflare's default list.
Custom Origin Trust Store replaces Cloudflare's default list of publicly trusted CAs rather than adding to it. Once custom CA certificates are uploaded, Cloudflare exclusively uses those uploaded CAs to authenticate the origin.
For example, suppose your origin previously used a certificate issued by an internal CA and the zone was configured to trust that authority. If the origin is later changed to a publicly trusted certificate, Cloudflare may still reject it because the publicly trusted issuer is not included in the configured custom trust store.
Inspect the uploaded CA certificates and compare them with the chain currently presented by the origin. Also check whether the configured CA certificates are still valid, because an expired custom CA can prevent Cloudflare from authenticating the origin.
Correct the custom trust-store configuration through the supported Cloudflare controls or deploy a certificate issued by an authority trusted under the intended configuration. Do not delete or replace trust-store entries without checking whether other origins depend on them.
If Custom Origin Trust Store is not configured and the origin uses an unsupported private CA, replace the certificate with one Cloudflare can validate. Alternatively, implement the supported trust-store feature where available and appropriate for the origin's certificate infrastructure.
Error 526 After Renewal?
A certificate renewal can appear successful while Cloudflare Error 526 continues because not every HTTPS destination is serving the renewed certificate. This is especially relevant when the failure started immediately after a certificate update, hosting migration, load-balancer change or modification to an applicable origin-routing configuration.
Compare Every Active Origin
Suppose a website uses two origin servers behind a load balancer. The first origin serves the renewed certificate but the second still presents the previous certificate.
A direct test against the first origin succeeds, yet some requests through Cloudflare continue returning Error 526. To investigate, repeat the same OpenSSL certificate inspection against each origin IP address while preserving the affected SNI hostname.
Compare the certificate validity dates, issuer, Subject Alternative Name entries and certificate serial numbers. Differences can reveal a backend that was missed during certificate deployment.
For example, the following command identifies the certificate serial number and expiration date served by one origin:
openssl s_client \
-connect 203.0.113.10:443 \
-servername app.example.com </dev/null 2>/dev/null \
| openssl x509 -noout -serial -enddateRun the command separately for each relevant backend, substituting its actual address. If one origin presents the previous certificate, deploy the correct certificate on that backend and verify it before returning the server to normal traffic.
If every tested origin presents the same valid certificate, investigate whether Cloudflare is reaching another destination that was not included in your tests. This can happen when the active routing configuration differs from the origin addresses initially identified.
Check SNI and Routing Overrides
In supported configurations, Cloudflare Origin Rules can change the origin destination, Host header or SNI value used for a request. These changes may affect which certificate the origin presents and which hostname Cloudflare validates.
Origin Rules support DNS record, Host header and SNI overrides on Enterprise plans. Destination-port overrides are available on Free, Pro, Business and Enterprise plans, subject to the documented rule limits.
If your account does not support the relevant overrides, do not assume they are responsible for the error. Instead, inspect the origin selected by the DNS configuration, load balancer or other routing features actually used by the website.
For example, suppose visitors request app.example.com, but an Enterprise Origin Rule changes the origin SNI to backend.example.net. If the backend presents a certificate that does not satisfy the hostname Cloudflare is validating, the request can fail under strict verification.
When such a rule is configured, open the relevant Origin Rules and inspect the DNS destination, Host header and SNI overrides. Confirm that the rule applies to the failing hostname and that its certificate identity matches the intended origin setup.
Remember that an Origin Rule modifying the Host header also changes SNI to that value unless a separate SNI override is configured. This can affect which certificate the server presents and which hostname is validated.
Cloudflare's Rules simulator can help establish whether an Origin Rule matches the affected request. However, the simulator does not replace a direct certificate inspection, so use both findings together.
Correct the inaccurate override or install a certificate appropriate for the intended configuration. Avoid changing unrelated rules when the failing request does not match them.
If Error 526 Still Appears
If the certificate looks correct but Cloudflare continues reporting Error 526, identify which part of the connection still differs from your successful test. Concentrate on the actual origin destination, certificate identity, validation requirements and any configuration changes made before the failure began.
Use the remaining evidence to narrow the investigation:
| What you observe | What to investigate next |
|---|---|
| Certificate is valid locally but Cloudflare returns 526 | Whether Cloudflare reaches a different origin or uses another SNI value |
| Certificate renewal is complete but an old certificate appears | Active certificate paths and server reload status |
| One hostname works but another fails | Certificate SAN coverage and HTTPS virtual-host selection |
| Some requests work and others return 526 | Other load-balanced origins or address records |
| Origin CA certificate appears untrusted in OpenSSL | Whether the failure is only local public-CA verification |
| A public certificate fails chain verification | Missing intermediates or incorrect chain deployment |
| Certificate authority confirms revocation | Replace the revoked certificate with a newly issued valid certificate |
| Public certificate looks valid but Cloudflare rejects it | Check whether Custom Origin Trust Store overrides default CA trust |
| All tested origins appear correct | Cloudflare's actual destination, strict-mode configuration and request-specific evidence |
These checks focus on certificate identity and trust requirements rather than unrelated website functions. Purging Cloudflare's cache will not repair an invalid origin certificate.
Consider Temporary Recovery
Cloudflare documents changing the encryption mode from Full (strict) to Full as a possible workaround for Error 526. This can restore connectivity when the origin accepts HTTPS but presents a certificate Cloudflare cannot validate.
However, Full does not provide the same origin certificate authentication as Full (strict). Treat that change as a temporary, risk-assessed recovery measure rather than the permanent solution.
Avoid weakening certificate verification for sensitive applications simply to hide the error. If a temporary change is authorized, record the previous configuration and continue correcting the origin certificate.
Restore Full (strict) after the certificate passes the required validation checks. Do not switch to Flexible or disable HTTPS as a general solution for Error 526.
Escalate the Certificate Failure
If the certificate passes your tests and Error 526 remains, contact the hosting provider or Cloudflare support with the relevant diagnostic evidence. Provide the affected hostname, approximate failure time, Cloudflare Ray ID when available, SSL/TLS encryption mode and origin destination you tested.
Include the certificate subject, issuer, validity dates, SAN entries, OpenSSL verification output and any applicable Origin Rule or load-balancer configuration. If Custom Origin Trust Store is configured, mention that as well.
Explain whether the failure occurs on every request or only intermittently. If a recent certificate renewal or backend migration preceded the problem, include that information to help establish which change may have introduced the failure.
Do not send private keys or other certificate secrets with a support request. The public certificate details and the server's observed behaviour are normally sufficient to begin investigating validation failures.
Ask the provider to verify which origin destination and certificate are involved in the failing Cloudflare connection. This can reveal differences that are not visible when testing only one origin manually.
Verify the Certificate Fix
After correcting the certificate or routing configuration, repeat the OpenSSL inspection against the destination that previously failed. Confirm that the origin now serves the intended certificate, the hostname is covered and the validity period is current.
For publicly trusted certificates, also confirm that the required intermediate chain is presented. If the previous failure involved revocation, verify that the replacement certificate is valid and that the revoked certificate is no longer being served.
If Custom Origin Trust Store caused the problem, confirm that the origin's current certificate chains to an authority Cloudflare is configured to trust. Then open the original failing hostname through Cloudflare without bypassing its proxy.
The same request should now produce the application's normal response instead of Error 526. Depending on the application, that may be a successful page, an authentication response or an expected redirect.
Check both the root domain and www hostname if they are used, along with any affected application subdomains. For websites using multiple origins, verify the certificate on each active destination because one successful request does not rule out an incorrectly configured backend.
Finally, confirm that Full (strict) is enabled if it was temporarily changed during recovery. Repeat the previously failing request to ensure Cloudflare can authenticate the intended origin without weakening certificate validation.
Cloudflare Error 526 is resolved when Cloudflare can validate the certificate served by the intended origin and the previously failing hostname works through the normal proxied connection. The important result is not merely having an SSL certificate installed but having the correct, trusted and properly configured certificate served to Cloudflare.


