Flexible
Last updated Sep 1, 2026 Setting your encryption mode to Flexible makes your site partially secure. Cloudflare allows HTTPS connections between your visitor and Cloudflare, but all connections between Cloudflare and your origin are made through HTTP. As a result, an SSL certificate is not required on your origin.
flowchart LR
accTitle: Flexible SSL/TLS Encryption
accDescr: With an encryption mode of Flexible, your application encrypts traffic between the visitor and Cloudflare, but not between Cloudflare and your server.
A[Visitor] <--Encrypted--> B((Cloudflare))<--Unencrypted--> C[(Origin server)]
Use when
Choose this option when you cannot set up an SSL certificate on your origin or your origin does not support SSL/TLS.
Required setup
Prerequisites
Depending on your origin configuration, you may have to adjust settings to avoid Mixed Content errors or redirect loops.
Process
To change your encryption mode in the dashboard:
- In the Cloudflare dashboard, go to the SSL/TLS Overview page. Go to Overview ↗
- Choose an encryption mode.
To adjust your encryption mode with the API, send a PATCH request with ssl as the setting name in the URI path, and the value parameter set to your desired setting (off, flexible, full, strict, or origin_pull).
Limitations
Caution
If your origin forces HTTPS by automatically redirecting HTTP requests to HTTPS, do not use Flexible mode. Because Cloudflare connects to your origin over HTTP, this creates a redirect loop that makes your site inaccessible. Use Full or Full (strict) mode instead.
Refer to ERR_TOO_MANY_REDIRECTS for troubleshooting guidance, or Enforce HTTPS connections to redirect traffic to HTTPS at the Cloudflare edge without setting up redirects at your origin.
Flexible mode is only supported for HTTPS connections on port 443 (default port). Other ports using HTTPS will fall back to Full mode.
If your application contains sensitive information (personalized data, user login), use Full or Full (Strict) modes instead.
Authenticated Origin Pull does not work when your SSL/TLS encryption mode is set to Off or Flexible.
Was this helpful?
YesNo
On this page
{"@context":"https://schema.org","@type":"TechArticle","@id":"https://developers.cloudflare.com/ssl/origin-configuration/ssl-modes/flexible/#page","headline":"Flexible","description":"Traffic from visitors to Cloudflare can be encrypted via HTTPS, but traffic from Cloudflare to the origin server is not. This mode is common for origins that do not support TLS, though upgrading the origin configuration is recommended whenever possible.","url":"https://developers.cloudflare.com/ssl/origin-configuration/ssl-modes/flexible/","inLanguage":"en","image":"https://developers.cloudflare.com/ssl/origin-configuration/ssl-modes/flexible/og.png?v=1be117a686540f86","dateModified":"2026-09-01","publisher":{"@type":"Organization","name":"Cloudflare","description":"One platform for your apps, agents, and workforce. Build, secure, and scale without managing infrastructure","url":"https://www.cloudflare.com/","sameAs":["https://github.com/cloudflare","https://www.linkedin.com/company/cloudflare","https://x.com/cloudflare"],"logo":{"@type":"ImageObject","url":"https://developers.cloudflare.com/logo.svg"},"address":{"@type":"PostalAddress","streetAddress":"101 Townsend St","addressLocality":"San Francisco","addressRegion":"CA","postalCode":"94107","addressCountry":"US"},"contactPoint":[{"@type":"ContactPoint","contactType":"Customer Support","url":"https://support.cloudflare.com/","availableLanguage":["English"]},{"@type":"ContactPoint","contactType":"Sales","url":"https://www.cloudflare.com/contact/","availableLanguage":["English"]}]},"isPartOf":{"@type":"WebSite","@id":"https://developers.cloudflare.com/#website","name":"Cloudflare Docs","url":"https://developers.cloudflare.com/"}}
description: Cloudflare matches the visitor request protocol when connecting to the origin. If the visitor uses HTTP, Cloudflare connects to the origin via HTTP; if HTTPS, Cloudflare uses HTTPS without validating the origin’s certificate. This mode is common for origins that use self-signed or otherwise invalid certificates. title: Full image: https://developers.cloudflare.com/ssl/origin-configuration/ssl-modes/full/og.png?v=b6a03916d80d7652
Documentation Index
Fetch the complete documentation index at: https://developers.cloudflare.com/ssl/llms.txt
Use this file to discover all available pages before exploring further.
Docs