HTTPS Inspection, TLS Decryption, and Do Not Inspect Exemptions
How secure web gateway TLS decryption works, when to enable it, Do Not Inspect policies, limits, and how to fix certificate errors.
This page summarises Cloudflare documentation on TLS decryption (also called HTTPS inspection or TLS inspection) in Cloudflare Gateway. Gateway can inspect DNS, network, HTTP, and egress traffic; decrypting HTTPS is what unlocks URL-level rules, Data Loss Prevention (DLP), anti-virus scanning, and Remote Browser Isolation on encrypted web traffic.
TLS decryption: what it does and when you need it
Section titled “TLS decryption: what it does and when you need it”TLS decryption lets Gateway read what is inside HTTPS—full URLs, headers, and request bodies—apply HTTP policies, then re-encrypt traffic toward the user with a user-side certificate.
Cloudflare Gateway can perform SSL/TLS decryption to inspect HTTPS traffic for malware and other security risks. TLS decryption is required for HTTP policies to inspect HTTPS traffic. Without it, information contained within HTTPS encryption, such as the full URL, headers, and request body, will not be visible to Gateway.
— Cloudflare, TLS decryption
With TLS decryption off, Gateway can still apply network policies to HTTPS using attributes such as user identity, device posture, IP, resolved domain, and SNI, but not the complete path or body. With it on, you can filter on the full URL, scan with DLP, start Clientless Web Isolation sessions, and use application-aware HTTP controls—as described in Enable TLS decryption (optional).
| Goal | TLS decryption typically required? |
|---|---|
| Block/allow by hostname or DNS category | Often no (DNS/network policies) |
| Block by full URL path or scan request body | Yes |
| DLP on HTTPS uploads/downloads | Yes |
| HTTP anti-virus / sandbox on files | Yes |
| Custom Gateway block page on HTTPS block | Yes (user trusts Cloudflare root CA) |
Prerequisites: Gateway proxy, root certificate, and traffic path
Section titled “Prerequisites: Gateway proxy, root certificate, and traffic path”HTTP filtering needs three pieces working together: the Cloudflare One Client (or another on-ramp) routing traffic through Gateway, the Gateway proxy intercepting connections, and a root certificate on devices so Gateway can decrypt and re-sign HTTPS.
HTTP filtering requires three components working together: the Cloudflare One Client routes device traffic through Cloudflare, a root certificate lets Gateway decrypt HTTPS traffic so it can inspect URLs and content, and the Gateway proxy enables Gateway to intercept and evaluate HTTP requests. Without the certificate, Gateway can only see the domain name — not the full URL or request body.
— Cloudflare, HTTP filtering
To inspect HTTPS traffic, you need to install a Cloudflare root certificate on each client device. A certificate is required for Cloudflare to decrypt TLS.
— Cloudflare, Cloudflare Gateway
When you enable TLS decryption, Gateway decrypts HTTPS in memory, applies policies, and re-encrypts with either the default Cloudflare-generated root or a custom root (Enterprise), as described in Enable TLS decryption.
Turn on the Gateway proxy (TCP and UDP for HTTP/3)
Section titled “Turn on the Gateway proxy (TCP and UDP for HTTP/3)”Network and HTTP filtering from enrolled clients requires the Gateway proxy. For HTTP/3 (QUIC on UDP port 443), you also need the UDP proxy alongside TLS decryption—see HTTP/3 inspection.
- In the Cloudflare dashboard, go to Zero Trust → Traffic policies → Traffic settings.
- Under Proxy and inspection, turn on Allow Secure Web Gateway to proxy traffic.
- Select TCP (required for most HTTP/HTTPS).
- Select UDP if you need HTTP/3 inspection or internal DNS over UDP—Proxy notes UDP is used for QUIC/HTTP/3.
- Optionally select ICMP for ping/traceroute to private targets (ICMP is proxied but not logged or filtered).
Third-party VPNs and privacy relays (for example iCloud Private Relay or Google Chrome IP Protection) can prevent Gateway from filtering traffic correctly; Cloudflare recommends disabling interfering software—see DNS policies and Gateway block page.
Enable TLS decryption: dashboard and API
Section titled “Enable TLS decryption: dashboard and API”Turn on Inspect HTTPS requests with TLS decryption
Section titled “Turn on Inspect HTTPS requests with TLS decryption”- Install a Cloudflare-generated or custom root certificate on user devices (prerequisite in TLS decryption).
- Go to Zero Trust → Traffic policies → Traffic settings → Proxy and inspection.
- Turn on Inspect HTTPS requests with TLS decryption.
- For FIPS-only cipher suites and TLS versions, use the FIPS option on the same settings page (TLS decryption — Enable FIPS compliance).
Equivalent Terraform for account settings:
resource "cloudflare_zero_trust_gateway_settings" "team_name" { account_id = var.cloudflare_account_id settings = { tls_decrypt = { enabled = true } }}Account API tokens need Zero Trust Write—see DLP troubleshooting.
Regional note: with Regional Services, Gateway performs TLS decryption for the Cloudflare One Client in default Traffic and DNS mode as described in Zero Trust data localization.
Do Not Inspect policies: bypass TLS decryption without turning it off globally
Section titled “Do Not Inspect policies: bypass TLS decryption without turning it off globally”Do Not Inspect HTTP policies tell Gateway not to decrypt matched HTTPS sessions. Gateway evaluates Do Not Inspect policies first; Cloudflare recommends placing them at the top of the HTTP policy list to avoid confusion—Common HTTP policies.
Bypassing the L7 firewall results in no HTTP traffic inspection, and logging is disabled for that HTTP session.
— Cloudflare, Policies FAQ
Do Not Inspect application type (certificate pinning)
Section titled “Do Not Inspect application type (certificate pinning)”Gateway maintains a Do Not Inspect application type for apps incompatible with TLS decryption (updated as Cloudflare identifies them):
Gateway automatically groups applications incompatible with TLS decryption into the Do Not Inspect app type.
— Cloudflare, Applications and app types
Example policy matching the whole incompatible set:
| Selector | Operator | Value | Action |
|---|---|---|---|
Application |
in |
Do Not Inspect |
Do Not Inspect |
You can scope by Application, Domain, Destination IP, device posture, or lists—for example Android + Google Drive in Common DLP policies. Traffic that matches bypasses DLP, HTTP logging, and AV scanning for that session.
Microsoft 365 and other integrations
Section titled “Microsoft 365 and other integrations”The Microsoft 365 traffic integration creates an auto-generated Do Not Inspect policy for Microsoft 365 domains and IPs (plus Cloudflare-identified related traffic). That bypasses Gateway logging and filtering for that traffic—enable only if you accept that trade-off—Applications and app types — Microsoft 365 integration.
Self-signed origins and Untrusted certificate action
Section titled “Self-signed origins and Untrusted certificate action”Gateway cannot complete TLS to origins with self-signed certificates unless you exempt or pass through. Options from Troubleshoot private networks:
- Permanent Do Not Inspect for the app domain or destination IP.
- Untrusted certificate action Pass through on an Allow policy (HTTP policies — Untrusted certificates).
- Cloudflare Tunnel with
noTLSVerifyfor published apps with self-signed certs.
| Untrusted certificate option | Behavior |
|---|---|
| Error | Gateway error page (default) |
| Block | Configured block page |
| Pass through | Connect despite upstream cert warnings |
PAC files and certificate-pinned apps
Section titled “PAC files and certificate-pinned apps”Do Not Inspect does not fix pinning for traffic sent DIRECT via PAC; pinned hosts must bypass the proxy in the PAC file—PAC file best practices.
Inspection limits: what TLS decryption cannot do
Section titled “Inspection limits: what TLS decryption cannot do”Gateway does not support TLS decryption for traffic that uses:
Certificate pinning
Self-signed certificates
Mutual TLS (mTLS) authentication
ESNI and ECH handshake encryption
Automatic HTTPS upgrades
— Cloudflare, TLS decryption — Inspection limitations
Certificate pinning and non-web TLS
Section titled “Certificate pinning and non-web TLS”Certificate pinning is a security mechanism used to prevent on-path attacks on the Internet by hardcoding information about the certificate that the application expects to receive.
— Cloudflare, Applications and app types
Some clients (many mobile apps, Zoom, Apple services, Kandji agent, CLI tools with private trust stores) reject Gateway’s re-signed certificate. Symptom examples include SSL: CERTIFICATE_VERIFY_FAILED—Troubleshoot Gateway. Remediation: targeted Do Not Inspect by domain list (for example github.com, *.amazonaws.com, *.docker.io) at higher precedence.
Gateway terminates client TLS and opens a new connection to the origin, so it cannot forward the client certificate—use Do Not Inspect for mTLS workloads (TLS decryption — Mutual TLS).
ECH / ESNI and DNS-level control
Section titled “ECH / ESNI and DNS-level control”Encrypted Client Hello hides SNI; Gateway relies on SNI to match HTTP policies. Network policies can still filter, but not SNI-based HTTP rules. Enterprise networks may strip ECH from HTTPS DNS records or use canary domains—see ECH Protocol — Enterprise network applicability and TLS decryption — ESNI and ECH.
Inspect on all ports
Section titled “Inspect on all ports”By default, HTTP inspection targets port 80 and HTTPS port 443. Inspect on all ports attempts TLS interception on every port—often requiring extra Do Not Inspect rules for non-HTTP TLS (SSH-over-TLS, databases). Non-HTTPS payloads inside TLS are not HTTP-filtered; with default-block network policies you may need explicit Allow rules for TLS and HTTP detected protocols—Protocol detection and Common network policies.
Special cases: authorization endpoints, MCP portals, Clientless isolation
Section titled “Special cases: authorization endpoints, MCP portals, Clientless isolation”- Authorization proxy endpoints always decrypt proxied HTTPS to read session cookies—you cannot selectively bypass inspection there—Proxy endpoints.
- MCP server portals decrypt portal traffic even when account-level TLS decryption is off; direct WARP-to-upstream MCP still needs global TLS decryption. Do Not Inspect still applies and blocks DLP on matched portal traffic—MCP server portals.
- Clientless Web Isolation can run without TLS decryption, but HTTP policies on isolation traffic require decryption; pinned sites need per-domain Do Not Inspect—Clientless Web Isolation.
HTTP/3 (QUIC): inspection and browser behavior
Section titled “HTTP/3 (QUIC): inspection and browser behavior”HTTP/3 uses QUIC over UDP. Without the UDP proxy, HTTP/3 bypasses HTTP inspection (network policies still apply). With UDP proxy and TLS decryption, Firefox and Edge are proxied; Chrome cancels HTTP/3 and retries over HTTP/2, which Gateway inspects. Safari does not disable QUIC—plan UDP proxy or accept bypass—HTTP/3 inspection.
You can exempt HTTP/3 from decryption with Do Not Inspect to preserve end-to-end encryption on that path while keeping the proxy enabled.
Common mistakes and how to fix them
Section titled “Common mistakes and how to fix them”| Symptom | Likely cause | Fix |
|---|---|---|
| DLP never triggers on HTTPS | Traffic not decrypted | Enable TLS decryption; confirm proxy—Scan HTTP traffic |
Generic ERR_SSL_PROTOCOL_ERROR on block |
No trusted Cloudflare root on device | Install CA in system trust store; verify MDM—Troubleshoot Gateway |
| 526 / “Insecure Upstream” to private app | Self-signed or untrusted server cert | Do Not Inspect, Pass through, or fix origin CA—Private network connectivity |
git / kubectl / Docker TLS errors |
App ignores OS trust store or pins certs | Domain list Do Not Inspect—Troubleshoot Gateway |
| Another security product on device | Double TLS interception | Disable HTTPS inspection for WARP IPs in the other product—Client errors |
| Pinned app still fails via PAC | Traffic not hitting Gateway | PAC DIRECT bypass for pinned hosts—PAC file best practices |
Recommended baseline after enabling inspection: a policy for the Do Not Inspect application group plus threat blocking—walkthrough in HTTP filtering and Get started — Phase 3: HTTP inspection.
For rollout strategy (goals, minimal inspection, device serial lists, tunnel IP exemptions), see Use TLS inspection.
How to check this on your site
Section titled “How to check this on your site”- In Zero Trust → Traffic policies → Traffic settings, confirm Allow Secure Web Gateway to proxy traffic includes TCP (and UDP if you need HTTP/3 or QUIC), and Inspect HTTPS requests with TLS decryption is on—Proxy and TLS decryption.
- On a test device, confirm the Cloudflare root certificate is in the system trust store (not only user store)—Troubleshoot Gateway.
- Browse to an HTTPS site that should match an HTTP policy (for example a test block rule) and confirm the action matches the policy—not a generic TLS error—Gateway block page.
- If DLP or URL rules fail, temporarily add a narrow Do Not Inspect rule to see whether decryption or pinning is the issue—Troubleshoot DLP.
- You can check automatically in Answerwell (our tool): https://answerwell.org/workspace
Report an error or ask a question
Section titled “Report an error or ask a question”If something on this page is wrong or unclear, email yimasynthetic@gmail.com with the page URL and the exact statement you are asking about, and we will correct or clarify it.