Fix Cloudflare 526 Error - SSL Certificate Compatibility with Full vs Full (Strict)

December 17, 2025

Cloudflare 526 Error: Invalid SSL Certificate

Problem

When using Cloudflare as a reverse proxy, you may encounter a 526 error which indicates an invalid SSL certificate on your origin server.

This happened to me when my website was configured with Cloudflare's SSL/TLS encryption mode set to Full (strict).

Root Cause

Cloudflare offers several SSL/TLS encryption modes:

ModeDescription
OffNo encryption
FlexibleEncrypts traffic between browser and Cloudflare only
FullEncrypts end-to-end, but does NOT validate the origin certificate
Full (strict)Encrypts end-to-end AND validates the origin certificate

The 526 error occurs when:

  • Your SSL mode is set to Full (strict)
  • Your origin server's SSL certificate is:
    • Self-signed
    • Expired
    • Not issued by a trusted CA
    • Not matching the hostname

Solution

If your origin server uses a certificate that cannot be validated (e.g., self-signed, free certificates from certain providers, or certificates not recognized by Cloudflare), change the SSL mode from Full (strict) to Full.

Steps:

  1. Log in to your Cloudflare dashboard
  2. Select your domain
  3. Go to SSL/TLS > Overview
  4. Change the encryption mode from Full (strict) to Full

When to Use Each Mode

  • Full (strict): Use when your origin has a valid certificate from a trusted CA (e.g., Let's Encrypt, DigiCert)
  • Full: Use when your origin has a self-signed certificate or a certificate not trusted by Cloudflare

Note: Using Full mode is still secure for most use cases. The traffic between Cloudflare and your origin is still encrypted; it just doesn't validate the certificate chain.

Alternative: Use Cloudflare Origin CA Certificate

If you want to use Full (strict) mode, you can generate a free Cloudflare Origin CA certificate:

  1. Go to SSL/TLS > Origin Server
  2. Click Create Certificate
  3. Install the certificate on your origin server
  4. This certificate is trusted by Cloudflare and allows Full (strict) mode

References

  1. Cloudflare SSL/TLS encryption modes. (n.d.). Cloudflare docs. Retrieved December 17, 2025, from https://developers.cloudflare.com/ssl/origin-configuration/ssl-modes/
  2. 526 Invalid SSL certificate. (n.d.). Cloudflare docs. Retrieved December 17, 2025, from https://developers.cloudflare.com/support/troubleshooting/cloudflare-errors/troubleshooting-cloudflare-5xx-errors/#error-526-invalid-ssl-certificate

© 2025 borui. All rights reserved. This content may be freely reproduced, displayed, modified, or distributed with proper attribution to borui and a link to the article: borui (2025-12-17). Fix Cloudflare 526 Error - SSL Certificate Compatibility with Full vs Full (Strict). https://caiborui.com/blog/2025-12-17-en-cloudflare-526-error-ssl-mode

@misc{borui2025-c9a2e806,
  author = {borui},
  title = {{Fix Cloudflare 526 Error - SSL Certificate Compatibility with Full vs Full (Strict)}},
  year = {2025},
  publisher = {borui's blog},
  url = {https://caiborui.com/blog/2025-12-17-en-cloudflare-526-error-ssl-mode}
}