When a domain is proxied through Cloudflare there are really two connections: browser to Cloudflare, and Cloudflare to your server (the origin). The padlock in the browser only describes the first. The second is controlled by the encryption mode under SSL/TLS in the Cloudflare dashboard, and that one setting explains a surprising number of mysterious errors. The main options are Off, Flexible, Full and Full (strict); newer accounts also offer an automatic mode that probes your origin, but it still depends on the certificate your server presents.
Flexible: secure outside, open inside
The browser talks HTTPS to Cloudflare, but Cloudflare talks plain HTTP to your server on port 80. Visitors see a padlock while logins and order data cross the internet unencrypted on the second leg. Its best-known side effect is ERR_TOO_MANY_REDIRECTS: if the origin redirects HTTP to HTTPS, Cloudflare requests HTTP, gets redirected, the browser comes back over HTTPS, and the loop repeats forever.
Full: encrypted but not verified
Cloudflare connects to the origin over HTTPS on port 443 but accepts any certificate, including self-signed, expired or wrong-hostname ones. Traffic is encrypted on both legs, which is a big step up from Flexible, but because the certificate is never verified, an attacker sitting between Cloudflare and your server could in theory impersonate the origin. If nothing answers TLS on 443 at all, because the port is closed or the web server has no SSL configured, you get 525 SSL handshake failed.
Full (strict): the one to use
Same as Full, but the origin certificate must be valid, unexpired, cover the requested hostname and come from a trusted CA such as Let's Encrypt or from Cloudflare Origin CA. Otherwise Cloudflare returns 526 Invalid SSL certificate. Since free certificates are standard now, this is easy; sayt.uz hosting issues Let's Encrypt certificates from the panel, so such sites can go straight to Full (strict).
| Mode | Cloudflare to origin | Certificate check | Typical error |
|---|---|---|---|
| Flexible | HTTP, port 80 | None | Redirect loop |
| Full | HTTPS, port 443 | None | 525 |
| Full (strict) | HTTPS, port 443 | Full | 525, 526 |
Example: moving from Flexible to Full (strict)
A clothing shop in Namangan runs misol.uz on WordPress and left Cloudflare on Flexible. When the developer enabled forced HTTPS in WordPress, the site fell into a redirect loop. Disabling the redirect would hide the symptom but keep the unencrypted leg. The proper fix is to confirm the origin has a real certificate, bypassing Cloudflare by IP, and then switch to Full (strict). Replace 203.0.113.10 with your server's real address.
curl -vI https://misol.uz --resolve misol.uz:443:203.0.113.10
echo | openssl s_client -connect 203.0.113.10:443 -servername misol.uz 2>/dev/null \
| openssl x509 -noout -subject -issuer -dates
Troubleshooting 526
A 526 after enabling strict mode almost always means the origin certificate is expired, does not include the hostname being visited (for example www), or is a temporary self-signed certificate that Full tolerated. Also make sure Cloudflare redirects and security rules don't block HTTP-01 renewals passing through the proxy. Some admins avoid the issue entirely with a Cloudflare Origin certificate, valid for up to 15 years and trusted only by Cloudflare.
Protecting the origin itself
Once the curl and openssl checks show a valid certificate for the right hostname, switch the mode under SSL/TLS in the dashboard and reload the site to confirm the redirect loop is gone.
Strict mode secures only the Cloudflare-to-origin path. Anyone who knows your server's IP can still bypass Cloudflare, so for sensitive projects allow only Cloudflare IP ranges at the firewall or enable Authenticated Origin Pulls.