skip to content

Encryption Modes & Origin CA

The SSL/TLS mode decides whether Cloudflare reaches the origin over HTTP, unverified HTTPS or verified HTTPS. Interviewers ask why Flexible loops on redirects and what Full (strict) needs.

on this pageshow

explore

questions

5

In Cloudflare, how do the SSL/TLS encryption modes Off, Flexible, Full and Full (strict) differ on the connection from Cloudflare to your origin?

level: juniorimportance: must knowfreq 75%

answer

  1. two connections, one zone setting
  2. plain HTTP versus unverified HTTPS
  3. Full mirrors the visitor's scheme
  4. issuer, expiry and hostname checked

basics

~20 s

The encryption mode sets how Cloudflare reaches the origin: Off and Flexible use plain HTTP, Full uses HTTPS for HTTPS visitors without checking the origin certificate, and Full (strict) also validates it. Off also downgrades visitors to HTTP.

solid answer

~40 s

A zone's **SSL/TLS encryption mode** governs two connections: visitor to Cloudflare, and Cloudflare to the origin. **Off** serves everything over HTTP and redirects HTTPS requests to HTTP. **Flexible** gives visitors HTTPS but always fetches from the origin over plain HTTP, so the origin needs no certificate and that leg travels unencrypted. **Full** connects with the scheme the visitor used and, over HTTPS, accepts any certificate: self-signed, expired or for the wrong name. **Full (strict)** does the same but requires an unexpired certificate from a publicly trusted CA or Cloudflare Origin CA whose CN or SAN matches the hostname, and answers 526 otherwise. Enterprise zones also get **Strict (SSL-Only Origin Pull)**, which always uses HTTPS to the origin. Full (strict) is the mode to aim for.

go deeper

for a junior

Name the five modes and say for each what the Cloudflare-to-origin leg uses: HTTP, unverified HTTPS or verified HTTPS. Know that Full (strict) is the recommended target.

for a middle

Explain the three checks Full (strict) makes, the 525 versus 526 split, and that Full mirrors the visitor's scheme while Strict (SSL-Only Origin Pull) always uses HTTPS.

for a senior

Show you know where the padlock lies: Flexible and Full both look secure to the browser while leaving the origin leg readable or unauthenticated, and say how you would find such zones.

for a principal

Be ready to argue why an organisation should treat Full (strict) as the floor for public zones, and what exceptions, owners and deadlines a policy allowing Full or Flexible would need.

## Two connections, one setting When a hostname is proxied through Cloudflare, a single page view uses **two separate connections**: one from the visitor's browser to Cloudflare's edge, and a second from Cloudflare to your **origin** (the server that really holds the site). The browser only ever sees the first one, and its padlock describes only the first one. The zone's **SSL/TLS encryption mode** is the setting that decides what happens on the second leg: whether Cloudflare speaks HTTP or HTTPS to the origin, and whether it checks the certificate the origin presents. You pick the mode on the **SSL/TLS Overview** page, or through the zone setting named `ssl`, whose API values are `off`, `flexible`, `full`, `strict` and `origin_pull`. ## The modes side by side | Mode | Visitor to Cloudflare | Cloudflare to origin | Origin certificate | |---|---|---|---| | **Off** | HTTP only; HTTPS requests are redirected to HTTP | HTTP | not used | | **Flexible** | HTTP or HTTPS | always HTTP | not needed | | **Full** | HTTP or HTTPS | same scheme as the visitor | presented but not validated | | **Full (strict)** | HTTP or HTTPS | same scheme as the visitor | validated | | **Strict (SSL-Only Origin Pull)** | HTTP or HTTPS | always HTTPS | validated (Enterprise only) | Two details in that table catch people out: - **Full and Full (strict) mirror the visitor's scheme.** A visitor who arrives over plain `http://` is fetched from the origin over HTTP too, unless something at the edge (such as **Always Use HTTPS**) has already upgraded them. Only **Strict (SSL-Only Origin Pull)** forces HTTPS to the origin regardless. - **Flexible applies to HTTPS on port 443 only.** HTTPS requests on Cloudflare's other HTTPS ports fall back to Full behaviour. ## What each mode protects 1. **Off** protects nothing. Browsers mark the site "not secure", and options such as Always Use HTTPS are not even offered while the mode is Off. 2. **Flexible** encrypts the visitor leg only. The origin leg crosses the internet in cleartext, so logins, cookies and personal data are readable to anyone on that path. Cloudflare's guidance is to use it only when the origin cannot do TLS at all, and to avoid it for sensitive data. 3. **Full** encrypts the origin leg but **does not authenticate the origin**. Cloudflare accepts a certificate that is expired, self-signed, or issued for a different hostname, so a party able to intercept that leg could present its own certificate. 4. **Full (strict)** encrypts and authenticates. It is the mode Cloudflare recommends whenever the origin can hold a valid certificate. ## What "validated" means in Full (strict) Under Full (strict) the origin's certificate must be: - **unexpired**, meaning the current time falls between its not-before and not-after dates; - **issued by a trusted authority**, either a publicly trusted CA in Cloudflare's trust store or **Cloudflare Origin CA**, Cloudflare's own free CA for origin certificates; - **for the right name**, with a Common Name or Subject Alternative Name matching the requested or target hostname. When the check fails the visitor sees a Cloudflare **526** error. A **525** means something earlier went wrong: the TLS handshake with the origin itself failed, for example because the origin does not accept HTTPS on port 443. Cloudflare's error responses mark both as not worth retrying until the origin's TLS configuration is fixed. ## Choosing a mode - Aim for **Full (strict)** on every zone. A free Origin CA certificate is enough if the origin is only reached through proxied records. - Treat **Full** as a stepping stone while you install a valid certificate, not as a destination. - Use **Flexible** only for an origin that truly cannot terminate TLS, and never in front of logins or personal data. - Do not use **Off** for a public site. - Move to **Strict (SSL-Only Origin Pull)** on Enterprise when the origin should never see plain HTTP, even from visitors who typed `http://`. Whatever you choose, the browser's padlock only ever describes the visitor's connection to Cloudflare. A site on Flexible looks exactly as secure to a visitor as one on Full (strict), which is why the mode has to be checked in the zone's settings rather than in a browser. The mode is a zone-wide default. A Configuration Rule can override it for matching requests when one hostname or path needs a different mode, which is useful while some origins are still being fixed.

  • What does Strict (SSL-Only Origin Pull) add over Full (strict)?
    It is Enterprise-only and always connects to the origin over HTTPS, even when the visitor arrived over plain HTTP. Full (strict) mirrors the visitor's scheme, so an HTTP visitor is fetched over HTTP unless the edge has already upgraded the request, for example with Always Use HTTPS. Certificate validation is the same in both modes.
  • Which Cloudflare error codes tell you the origin leg is failing under Full or Full (strict)?
    A 525 means the TLS handshake with the origin failed, for example because nothing accepts HTTPS on port 443. A 526 means Full (strict) rejected the origin certificate: expired, from an untrusted issuer, or without a matching CN or SAN. Cloudflare's error responses mark both as not retryable until the origin's TLS is fixed.
  • Can one zone use different encryption modes for different hostnames?
    Yes. The zone mode is the default, and a Configuration Rule with the `ssl` setting overrides it for requests matching its expression, for example `http.host eq "legacy.example.com"`. Teams use this to keep one origin on Full while it gets a valid certificate and run everything else on Full (strict).

Flexible is a sealed letter to a mailroom that then forwards it as a postcard. Full seals it all the way but hands it to whoever answers the door at that address, without checking ID. Full (strict) checks the ID before handing it over.

  • Flexible encrypts the whole path because the browser shows a padlock.
  • Full checks the origin certificate, only less strictly than Full (strict).
  • Full (strict) accepts only certificates from a publicly trusted CA.
  • Full always reaches the origin over HTTPS, even for plain HTTP visitors.
  • Off still serves HTTPS visitors with the edge certificate.
open as a page

A Cloudflare zone set to Flexible fronts an origin that redirects HTTP to HTTPS, and browsers now show ERR_TOO_MANY_REDIRECTS; why, and what is the right fix?

level: seniorimportance: must knowfreq 65%

basics

~20 s

Flexible always fetches the origin over HTTP, so the origin's HTTPS redirect fires even for visitors already on HTTPS, and the browser loops. Install an origin certificate, switch to Full (strict), and redirect HTTP visitors at the edge with Always Use HTTPS.

open as a page

With Cloudflare's Automatic SSL/TLS setting, how does Cloudflare choose and change a zone's encryption mode, and what will it never do?

level: middleimportance: should knowfreq 35%

basics

~20 s

Automatic SSL/TLS, the default, probes the origin over HTTP and HTTPS and moves the zone to the most secure working mode, ramping from 1% of traffic and rolling back on errors. It never downgrades, even after a certificate expires.

open as a page

What is a Cloudflare Origin CA certificate, how do you use one to run Full (strict), and when does it cause certificate errors?

level: middleimportance: should knowfreq 50%

basics

~20 s

A Cloudflare Origin CA certificate is a free certificate that only Cloudflare trusts, which is enough for Full (strict). Browsers reject it, so visitors reaching the origin directly, through a DNS-only record or a paused zone, get certificate errors.

open as a page

A Cloudflare zone runs Full because its origin presents a self-signed certificate; what does that leave exposed, and how do you reach Full (strict) without 526 errors?

level: seniorimportance: should knowfreq 45%

basics

~20 s

Full encrypts the origin leg but accepts any certificate, so anyone able to intercept it can impersonate the origin. Give every hostname a valid Origin CA or public certificate, test each origin, flip one hostname with a Configuration Rule, then the zone.

open as a page