The SSL/TLS mode in a Cloudflare zone controls exactly one hop: the connection between Cloudflare’s edge and your origin server. The browser-to-edge hop is always TLS once you have an edge certificate. Flexible is the mode that catches new operators by surprise — the padlock shows in the browser, the site looks fine, and the origin is receiving plain HTTP. This article is for the person who inherited a zone set to Flexible and needs to move it to Full (Strict) without breaking the site.
How to verify
Check what mode the zone is on, and what cert the origin is actually serving:
# What SSL mode is the zone in?
curl -X GET "https://api.cloudflare.com/client/v4/zones/<zone-id>/settings/ssl" \
-H "Authorization: Bearer <token>"
# What cert does the origin serve directly (bypass Cloudflare)?
openssl s_client -connect <origin-ip>:443 -servername example.com </dev/null 2>&1 \
| openssl x509 -noout -subject -issuer -dates
# Does the origin even answer on 443?
curl -kI --resolve example.com:443:<origin-ip> https://example.com/
# Does it answer on 80, and what does it return?
curl -I --resolve example.com:80:<origin-ip> http://example.com/
If the second command returns a cert, you have a working origin TLS endpoint and you can target Full or Full (Strict). If it errors out, the origin is HTTP-only and you must fix that before changing the mode.
What’s happening
Cloudflare sits between the visitor and your origin. There are two TLS hops to think about: visitor-to-Cloudflare (the “edge hop”) and Cloudflare-to-origin (the “origin hop”). The edge hop is handled by the edge certificate (Universal SSL, ACM, or a Custom Certificate). The origin hop is what the SSL/TLS mode controls.
The four modes:
- Off — both hops are HTTP. Almost never correct in 2026.
- Flexible — edge hop is HTTPS, origin hop is HTTP. The browser sees a padlock, the origin sees plain text on port 80. Dangerous because the origin almost always also redirects HTTP to HTTPS, which triggers a redirect loop, AND because anyone between Cloudflare and the origin can read or modify the traffic.
- Full — both hops are HTTPS. Cloudflare accepts any cert the origin presents, including expired and self-signed. Encrypted but not authenticated — a network attacker between Cloudflare and the origin could MITM with a forged cert.
- Full (Strict) — both hops are HTTPS, and Cloudflare validates the origin cert against a public CA bundle OR accepts Cloudflare Origin CA certs. This is the only mode that gives you actual end-to-end authenticated encryption.
The decision is almost always Full (Strict). The reasons people end up on Flexible are historical: the origin only listens on port 80, or the operator could not get a free cert installed on the origin, or someone copied an old playbook. Cloudflare Origin CA solves both — see origin certificates for the issuance flow.
The procedure
Migrating from Flexible to Full (Strict) without breaking the site is a sequence, not a single toggle.
-
Get TLS working on the origin first. Before touching the dashboard, the origin must answer on 443 with a cert Cloudflare will trust. The easiest path is a Cloudflare Origin CA certificate — free, valid up to 15 years, trusted by Cloudflare’s strict mode. Generate it in the dashboard under SSL/TLS → Origin Server → Create Certificate, install on the origin (Nginx
ssl_certificateandssl_certificate_key, or the equivalent in Apache/HAProxy/Caddy), and reload the web server. Verify with theopenssl s_clientcommand above before going further. -
Move to Full, not Full (Strict), first. This catches the case where the origin is serving the wrong cert for the hostname (wrong SAN, wrong hostname binding). Set the mode in SSL/TLS → Overview to Full. Watch the origin and the edge for a few minutes. If the site stays up, the origin hop is encrypting cleanly — you just don’t have authentication yet.
-
Fix any HTTP-only origin URLs. Search the origin’s database and templates for hardcoded
http://example.com/...references. The biggest offenders are CMS configs (WordPresshome/siteurl), image URLs in posts, and JavaScript bundles. With the origin now on HTTPS, leaving these ashttp://will cause mixed-content warnings once you also turn on Always Use HTTPS at the edge. -
Turn on Automatic HTTPS Rewrites. Under SSL/TLS → Edge Certificates → Automatic HTTPS Rewrites. This rewrites
http://URLs in HTML responses tohttps://at the edge — a safety net for stragglers, not a substitute for fixing the source. -
Move the mode to Full (Strict). Under SSL/TLS → Overview. If the site breaks, the cert on the origin is not trusted — most likely self-signed or hostname mismatch. Reissue the Origin CA cert covering the right hostnames and retry. The error you’ll see at the edge is HTTP 526 (untrusted cert) or 525 (handshake failure).
-
Lock the origin so only Cloudflare can reach it. Once Full (Strict) is stable, restrict the origin firewall to Cloudflare IPs (published at
https://www.cloudflare.com/ips/) and enable Authenticated Origin Pulls so the origin requires a client cert from Cloudflare. Without this, an attacker who learns the origin IP can bypass the entire edge.
Common pitfalls
- Switching from Flexible directly to Full (Strict) without first verifying the origin answers on 443 — site goes down instantly with 525 errors at every page load.
- Leaving the origin’s port 80 listener open and unrestricted after the migration, so anyone who finds the origin IP can still pull plaintext.
- Forgetting that Always Use HTTPS is a separate toggle from the SSL/TLS mode — turning on Always Use HTTPS while still in Flexible is what produces the classic redirect loop.
- Using a Let’s Encrypt cert at the origin with HTTP-01 validation while the zone is proxied (orange-clouded) through Cloudflare — the validation request never reaches the origin. Use DNS-01 or use the Origin CA cert.
- Assuming the padlock in the browser means the origin hop is encrypted. The padlock only tells you about the browser-to-edge hop.
In the engagements we run, Flexible never survives the first audit — the migration above is a standard line item in the Cloudflare hardening pass. Stack Harbor handles edge and origin TLS together under managed operations so the two ends stay aligned across renewals, hostname changes, and infrastructure moves.