skip to content

Proxied vs DNS-Only

A proxied record answers with Cloudflare addresses and routes HTTP traffic through its network; a DNS-only record exposes the origin. Interviewers ask which records leak an origin IP.

on this pageshow

explore

questions

5

In Cloudflare DNS, what changes when an A, AAAA or CNAME record is Proxied instead of DNS-only?

level: juniorimportance: must knowfreq 75%

answer

  1. what the resolver gets back
  2. shared addresses, nearby data center
  3. only address records qualify
  4. TTL locked at Auto

basics

~20 s

A Proxied (orange-cloud) record is answered with Cloudflare anycast IPs, so its HTTP and HTTPS traffic passes through Cloudflare's cache, WAF and DDoS protection; a DNS-only (gray-cloud) record returns the real origin address and bypasses all of it.

solid answer

~40 s

Proxy status is a per-record switch that only `A`, `AAAA` and `CNAME` records have; `MX`, `TXT` and every other type are always DNS-only. When a record is **Proxied**, Cloudflare's answer contains Cloudflare anycast addresses instead of the record's content, so clients connect to a nearby Cloudflare data center. That data center applies caching, WAF rules, redirect rules and DDoS mitigation, then opens its own connection to the origin, which sees Cloudflare's IPs and finds the visitor's address in `CF-Connecting-IP`. A **DNS-only** record answers with the real IP or CNAME target: clients talk to the origin directly, anyone running `dig` learns the address, and Cloudflare reports only DNS analytics for it. Proxied records also carry a fixed TTL of Auto, 300 seconds, which cannot be edited.

go deeper

for a junior

Recall the two states and what a query returns in each: Cloudflare anycast IPs for Proxied, the real content for DNS only. Know that only A, AAAA and CNAME records can be proxied.

for a middle

Explain what happens on the request path: TLS terminates at Cloudflare, rules apply, a new connection reaches the origin, and the visitor IP moves into CF-Connecting-IP. Mention the fixed Auto TTL.

for a senior

Show which records belong gray-clouded and why, and what proxying changes for the origin: source-address logging, client certificates, firewalls that throttle Cloudflare's ranges.

for a principal

Frame proxy status as a default the team enforces: proxy every web record, keep a short list of justified DNS-only records, and review that list when services move.

## What proxy status is Every `A`, `AAAA` and `CNAME` record in a Cloudflare zone has a **proxy status** beside its name and content. The dashboard draws it as a cloud: **orange** for **Proxied**, **gray** for **DNS only**. In the DNS records API the same switch is the boolean `proxied` field, and the `proxiable` field in API responses says whether the record could be proxied at all. Only the address records qualify: `MX`, `TXT`, `SRV`, `CAA` and the other types are always DNS-only, because Cloudflare's proxy handles HTTP and HTTPS and nothing else. When a domain is onboarded through the dashboard, proxying starts switched on; in the API, `proxied` defaults to `false` when it is omitted. ## What a proxied answer contains A query for a proxied name never returns the record's content. Cloudflare answers with **anycast IP addresses**: addresses from Cloudflare's published ranges that are announced from data centers worldwide and shared by all proxied hostnames. A browser that resolves the name therefore connects to a nearby Cloudflare data center, which: - terminates the visitor's TLS connection with an edge certificate; - applies the zone's configuration, such as caching, WAF custom and managed rules, redirect rules and DDoS mitigation; - opens a separate connection to the address in the record and forwards whatever is left of the request. A proxied `CNAME` is **flattened** by default: Cloudflare follows the chain itself and answers with its own anycast addresses rather than exposing the target name. ## What DNS-only means A DNS-only record behaves like a record at any authoritative DNS provider. The answer is the record's content: the origin's IP for `A` and `AAAA`, the target name for `CNAME`. Clients connect straight to that address, so: 1. the origin IP is visible to anyone who queries the record; 2. none of the proxy features apply to that traffic, because it never reaches Cloudflare's HTTP layer; 3. Cloudflare can show DNS analytics for the name, but no HTTP analytics. DNS-only is the right choice for records that do not carry web traffic: mail hosts, domain-verification CNAMEs, hosts for SSH or other non-HTTP protocols, and hostnames pointing at a SaaS platform or another CDN that terminates TLS itself. | | Proxied (orange) | DNS only (gray) | |---|---|---| | Answer to a query | Cloudflare anycast IPs | The record's real content | | HTTP features (cache, WAF, DDoS) | Applied | Not applied | | TTL | Auto, fixed at 300 seconds | Editable: 60 seconds (30 on Enterprise) to 1 day, or Auto | | Origin IP visible in DNS | No | Yes | | Analytics | HTTP and DNS | DNS only | ## Side effects the origin notices Putting a proxy in front of a server changes what the server sees: - **Source address**: every request arrives from a Cloudflare IP. The visitor's address travels in the `CF-Connecting-IP` and `X-Forwarded-For` request headers, so logging, rate limits and geolocation at the origin must read those instead of the socket address. - **TLS**: the visitor's TLS session ends at Cloudflare, and Cloudflare opens its own to the origin, so an origin that validated client certificates no longer receives them. - **Headers**: Cloudflare adds and modifies request headers, which breaks software that parses headers by position. - **Firewalls**: traffic from a few Cloudflare ranges can look like an attack to an origin firewall; those ranges must be allowed. ## Checking a record from outside Two quick checks tell which state a name is really in, whatever the dashboard says: - **The DNS answer.** `dig +short www.example.com A` returns addresses from Cloudflare's published IP ranges for a proxied name, and the record's own content for a DNS-only one. - **The HTTP response.** A response that went through the proxy carries a `Cf-Ray` header, a Ray ID ending in the three-letter code of the data center that handled it. A DNS-only name answers straight from the origin, normally without one. A name can be set to Proxied and still answer with the origin while the zone is pending, which is why the outside view is worth checking after onboarding. ## Rules worth remembering - **Fixed TTL.** A proxied record's TTL is Auto, 300 seconds, and cannot be edited, so that Cloudflare can change the anycast addresses quickly. - **Mixed records on one name.** If several `A` or `AAAA` records share a name and at least one is proxied, Cloudflare treats all of them as proxied. - **CNAME chains.** If any hostname on a CNAME chain within the same account is proxied, the request is proxied. - **Pending zones.** Until a newly added zone is activated, every record answers as DNS-only, even those set to Proxied. - **Refused targets.** Cloudflare warns about, or refuses, proxying some CNAME targets known to belong to other CDNs, DKIM or domain validation, because a proxied version would break them.

  • In Cloudflare DNS, what happens when a name has two A records and only one of them is Proxied?
    Cloudflare treats every `A` and `AAAA` record on that name as proxied. Queries are answered with anycast addresses and requests to both origins go through the proxy. The same holds along a CNAME chain in one account: if any hostname on the chain is proxied, the request is proxied.
  • Why should a CNAME that proves domain ownership to a third-party service, or points at a SaaS-hosted site, usually stay DNS-only?
    A proxied CNAME returns Cloudflare's addresses instead of the expected target, so the verifier cannot match it and verification fails. For a SaaS host, both Cloudflare and the platform try to terminate TLS and redirect to HTTPS, which causes certificate errors and redirect loops, unless the platform supports Cloudflare's proxy, for example through Cloudflare for SaaS.
  • After switching a record to Proxied, why do an origin's access logs show only a handful of client IPs?
    Every request now arrives from Cloudflare's IP ranges, not from visitors. Cloudflare passes the visitor's address in `CF-Connecting-IP` and `X-Forwarded-For`; the origin's logging, allowlists and rate limits must read those headers, and its firewall must allow Cloudflare's ranges so it does not block them.

A proxied record is like publishing a company switchboard number instead of an employee's direct line: callers reach the switchboard, which screens and routes them, and the direct line stays private. A DNS-only record prints the direct line in the phone book.

  • MX and TXT records can be switched to Proxied like A records.
  • A gray-cloud record still gets WAF and DDoS protection for its web traffic.
  • You can raise a proxied record's TTL to cut DNS query volume.
  • With the orange cloud, the origin still sees each visitor's IP as the source address.
  • A proxied answer returns the origin IP along with a Cloudflare IP.
open as a page

A site's apex and www records are proxied on Cloudflare, yet attackers reach the origin directly; which records in the zone could have exposed its IP?

level: seniorimportance: must knowfreq 60%

basics

~20 s

Any answer carrying the origin's address: a DNS-only A, AAAA or CNAME for another service on that server, a mail host or _dc-mx answer, a DNS-only wildcard, and every record while the zone was pending activation.

open as a page

In Cloudflare DNS, why can't mail go through the proxy, and what happens when an MX record points at a proxied hostname?

level: middleimportance: should knowfreq 35%

basics

~20 s

Cloudflare's proxy does not carry SMTP, so MX records are always DNS-only; an MX aimed at a proxied name is answered with a generated _dc-mx name resolving to the origin IP, which keeps mail flowing but exposes that IP.

open as a page

Behind a proxied Cloudflare record, which ports reach the origin, and what do an SSH host and a UDP game server need instead?

level: middleimportance: should knowfreq 50%

basics

~20 s

A proxied Cloudflare record accepts HTTP on 80, 8080, 8880, 2052, 2082, 2086, 2095 and HTTPS on 443, 2053, 2083, 2087, 2096, 8443; SSH, UDP game traffic and other ports are dropped, so those hosts need DNS-only or Spectrum.

open as a page

As the lead for many Cloudflare zones, would you put the account-level enforce DNS-only switch in your incident runbook, and on what terms?

level: principalimportance: nice to knowfreq 15%

basics

~20 s

Only as a tested last resort: enforce_dns_only bypasses Cloudflare's proxy for every zone at once, exposing every proxied origin and removing WAF, cache and DDoS protection, so origins need capacity, publicly trusted certificates and a rotation plan first.

open as a page