Orange Book
CDN and web performance

02 · Decide between Proxied and DNS only

Decide when A, AAAA, and CNAME records should use the orange cloud and when mail, validation, or non-HTTP services must remain DNS only.

Edited and verified by Orange Book Editorial Team ·

CDN · PHASE 1BEGINNERAbout 18 minutesDNS · Proxied · DNS only

The decision rule

The orange cloud is not a decorative “faster DNS” switch. It means HTTP/HTTPS traffic for a hostname reaches Cloudflare first. Enable it only for records that actually carry supported web traffic.

One decision tree

flowchart TD
  A[What does this record do?] --> B{A / AAAA / CNAME?}
  B -->|No| G[DNS only]
  B -->|Yes| C{Carries HTTP or HTTPS?}
  C -->|No| G
  C -->|Yes| D{Mail / validation / another CDN?}
  D -->|Yes| G
  D -->|No| E{Upstream supports Cloudflare proxying?}
  E -->|No or unknown| G
  E -->|Yes| F[Proxied]

Common records

ScenarioExampleDefaultWhy
Website or public web app@, www, appProxiedPuts CDN, WAF, DDoS protection, and analytics on the path
HTTP APIapiUsually ProxiedEnables proxy security and performance, subject to upstream IP validation
Mail exchangeMX, mailDNS onlyOrdinary mail protocols do not use the HTTP proxy
SPF, DKIM, DMARCTXT or validation CNAMEDNS onlyExternal systems need the original verification value
SaaS domain validation_verify, ACM validation CNAMEDNS onlyProxying or flattening every CNAME can break validation
SSH, FTP, RDP, game portsssh, ftpDNS onlyThe standard proxy is not a general TCP/UDP proxy
CNAME to another CDNCloudFront, Fastly, and similarUsually DNS onlyTwo proxies can conflict over TLS, routing, or hostname ownership

What proxying changes

ObservationProxiedDNS only
DNS answerCloudflare Anycast addressesConfigured origin address
Web request pathReaches Cloudflare firstClient connects directly to target
CDN/WAF/HTTP analyticsCan applyNot on this path
Origin IPHidden from normal web DNS answersDirectly exposed
DNS TTLCloudflare-managed Auto valueControlled by the record setting

Proxying does not prove the origin is hidden

Historical DNS, mail records, unproxied subdomains, and active scans can still reveal the same IP. Proxy status is not an origin firewall. Restrict production ingress while preserving necessary operations access.

Configure and verify

Assign an owner and purpose first

Do not begin with the cloud icon. Record who uses the hostname, which protocol it carries, and whether a third party requires the original DNS answer or origin IP. Leave an unknown record DNS only until its owner is known.

Proxy web records

Under DNS → Records, enable Proxied only for qualifying A, AAAA, and CNAME records. If one of several A/AAAA records sharing a name is proxied, Cloudflare treats the records for that name as proxied together.

Understand apex CNAME behavior

CNAME flattening allows a CNAME at the zone apex and returns the final IP address. It enables root custom domains for Pages, but can interfere with validation workflows that require the original CNAME response.

Verify DNS and HTTP separately

dig A www.example.com +short
dig MX example.com +short
curl -sS -D - -o /dev/null https://www.example.com/

A proxied web hostname usually returns Cloudflare addresses. MX should still name the real mail service. A cf-ray proves that the HTTP request reached Cloudflare, but it does not prove a cache hit.

Three misleading results

  • No CF-Cache-Status: the response may simply be outside caching; proxying can still work.
  • An old address after a change: account for recursive and local DNS caches before editing repeatedly.
  • Failed validation CNAME: confirm DNS only and check whether CNAME flattening was enabled for every CNAME.

For a shorter explanation, read DNS, the orange cloud, and proxy status. Continue with end-to-end TLS.

Primary sources

Did this page help you complete your goal?

Beta feedback is generated in this browser and is never uploaded automatically.

On this page