A typical case: you flip the CNAME for marketing.example.com from Webflow to a new self-hosted landing page, and the DNS console confirms the change. Five minutes later a colleague says the page still shows the old design on their laptop. You run dig +short marketing.example.com and get the new IP. Their laptop asks a different resolver, and that resolver may still hold the old record in its cache. Whose cache is wrong?

Look it up now →

The honest answer is "nobody's, the change just hasn't reached every recursive resolver yet" — but you cannot prove that from one dig against one resolver. You need to ask several public recursives, fast, and compare. Historically that meant a CLI loop, a paid network monitoring tool, or a multi-region checker site. The browser was no help: web pages cannot open UDP or TCP sockets to port 53, so they cannot speak classic DNS. RFC 8484 changed that in 2018 by standardising DNS-over-HTTPS, and Cloudflare and Google run public DoH endpoints that a page can call with fetch().

This guide covers the whole path: how DoH encodes a query, what each record type tells you, how DNSSEC and Extended DNS Errors show up in the JSON, where Cloudflare and Google differ, why CORS and ECS matter, and which conclusions you cannot draw from a browser lookup. The concrete numbers were measured with the ZeroTool DNS Lookup, which sends the same requests shown below, on the dates printed next to them.

What DNS-over-HTTPS changes

A traditional DNS query is a binary message over UDP port 53, with TCP port 53 as the fallback when a response is truncated (RFC 1035 §4.2). The browser exposes no socket API for either. DoH wraps the same DNS message in an HTTPS request, so the query looks like ordinary web traffic on port 443 and is encrypted on the wire (RFC 8484).

Two encodings exist:

  • The RFC 8484 wire format. A POST with Content-Type: application/dns-message, or a GET with the message base64url-encoded in ?dns=. The response body is a DNS message.
  • The JSON profile. A GET with ?name=…&type=… that returns JSON. It has no RFC; Cloudflare's documentation says it follows Google's schema, so the fields line up, with the differences covered below.

The browser does not need a DNS API for the JSON profile because the request is a normal cross-origin GET. On 2026-11-03 both endpoints answered with access-control-allow-origin: *, which is what lets a page on any origin read the response. The tool sends an Accept: application/dns-json header; Accept is a CORS-safelisted request header, so a GET with it does not trigger a preflight. A POST with a custom Content-Type, or any non-safelisted header, does trigger one, which is one reason the JSON profile is the easier choice in a page.

{
  "Status": 0,
  "TC": false,
  "RD": true,
  "RA": true,
  "AD": false,
  "CD": false,
  "Question": [{ "name": "zerotool.dev", "type": 1 }],
  "Answer": [
    { "name": "zerotool.dev", "type": 1, "TTL": 300, "data": "172.67.170.64" },
    { "name": "zerotool.dev", "type": 1, "TTL": 300, "data": "104.21.95.91" }
  ]
}

The fields are the DNS header and sections in JSON form. Status is the RCODE (RFC 1035 §4.1.1, extended by RFC 6895): 0 is NOERROR, 2 is SERVFAIL, 3 is NXDOMAIN. TC is the truncation flag; Cloudflare's documentation says it is almost always false over DoH because the resolver accepts the maximum response size. RD and RA describe recursion. AD and CD are the DNSSEC flags. Question, Answer, Authority and Additional mirror the four DNS sections. Comment carries resolver diagnostics, and Google adds extended_dns_errors for structured EDE data.

The request parameters are close but not identical:

ParameterCloudflareGoogleMeaning
namerequiredrequiredQuery name; Google accepts RFC 4343 backslash escapes
typeoptional, default Aoptional, default 1Record type as a name or a number
do0 / 10 / 1Include DNSSEC records (RRSIG, NSEC, NSEC3)
cd0 / 10 / 1Disable DNSSEC validation
ct—application/dns-messageReturn a binary DNS message instead of JSON
edns_client_subnet—1.2.3.4/24Send a client-subnet hint to authoritative servers
random_padding—any valueValue ignored; pad the URL for traffic-analysis resistance

Both providers document do as the DNSSEC OK bit and cd as Checking Disabled. The tool sends do=1 and cd=0: ask for signatures and let the resolver validate. Without do=1, Cloudflare's AD flag is not reliable (see the DNSSEC section).

The ten record types, and what they tell you

Each type answers a different operational question. Pick the wrong one and you spend hours chasing a phantom misconfiguration.

TypeCodeAsksCommon ops failure when missing or wrong
A1Which IPv4 address serves this name?Site loads on the developer's machine, 404 on someone else's — stale A vs new A.
AAAA28Which IPv6 address serves this name?An AAAA that still points at an old host breaks the site for clients that prefer IPv6, while IPv4-only testers see nothing wrong.
CNAME5Which canonical name does this alias point at?A CNAME to a deleted Heroku app or to the wrong tenant of a SaaS.
MX15Which servers accept mail for this domain?Inbound mail bounces with "no MX record found" or routes to the wrong provider after a migration.
TXT16Which policy strings are published?SPF says soft-fail, DMARC reports show legitimate mail flagged as spam, domain verification stuck at "pending".
NS2Who is authoritative for this zone?A registrar transfer left NS pointing at the old provider; updates do not propagate at all.
SOA6Who is the primary server, and how often do secondaries refresh?Secondaries serve stale data past the SOA refresh window, or a negative answer is cached too long.
CAA257Which certificate authorities may issue for this domain?A CA that is not listed refuses to issue, so renewal fails after a move to a new CA or CDN.
PTR12Which name does this IP claim?Mail bounces because the sending IP's PTR does not match the HELO domain; reputation services flag the sender.
SRV33Where does a service such as _xmpp-client._tcp live?XMPP, SIP, LDAP or Matrix federation cannot find the host because SRV is missing or has the wrong port.

The tool's ALL mode fans out parallel requests for the first eight types, which is the right default for "show me everything about this zone". PTR and SRV are excluded because PTR requires the in-addr.arpa form (34.216.184.93.in-addr.arpa) rather than a domain name, and SRV requires an underscore-prefixed service name (_xmpp-client._tcp.example.com). Both work better as targeted single-type queries.

A, AAAA and CNAME

A and AAAA return addresses with a TTL. A name can have several records, and CDNs rotate them. The TTL is the number of seconds a resolver may cache the set; it is not a promise about how long the change takes to reach every resolver, because each recursive resolver started its own countdown at a different time.

A CNAME answer says "this name is an alias for that name". The resolver usually follows the chain and appends the target's A/AAAA records, so a CNAME query can return several record types. Read the name field to see which record belongs to which step of the chain.

Two rules cause most CNAME surprises:

  • No other data at a CNAME node. A name with a CNAME cannot hold other records (RFC 1034 §3.6.2, RFC 1912 §2.4). The zone apex must hold SOA and NS, so it cannot be a plain CNAME.
  • Flattening hides the CNAME. Cloudflare's CNAME flattening and Route 53 alias records answer the apex with A/AAAA records at query time. A DoH query for such an apex returns addresses, not the CNAME you configured in the dashboard. That is correct behaviour, and it looks like a missing record if you expect the alias.

MX and TXT

MX records carry a preference and a host. Lower preference is tried first (RFC 5321 §5.1); equal values are a load-balancing hint. If a domain publishes no MX at all, SMTP treats the domain's A/AAAA as an implicit MX with preference 0 (RFC 5321 §5.1). That is why "no MX" does not always mean "no mail".

A Null MX is the explicit way to say "this domain accepts no mail": a single record with preference 0 and target . (RFC 7505). If a domain you expected to receive mail returns 0 ., the zone owner published that on purpose; the fix is to edit the zone, not to wait for propagation.

TXT carries SPF at the domain itself (RFC 7208), DMARC at _dmarc.example.com (RFC 7489 §6.1), and DKIM public keys at selector._domainkey.example.com (RFC 6376 §3.6.1). The same type also holds site-verification tokens for search consoles and SaaS products, which is why one TXT query can return a dozen unrelated strings.

The 255-byte rule is the part that breaks parsers. A TXT record is a sequence of character-strings, each at most 255 bytes (RFC 1035 §3.3 and §3.3.14). A long SPF or DKIM value is stored as several strings, and the consumer joins them with nothing in between (RFC 7208 §3.3 for SPF, RFC 6376 §3.6.2.2 for DKIM). The JSON APIs disagree on presentation: in a 2026-11-03 query, Cloudflare returned each string quoted and separated by a space, as dig prints it, while Google returned the same key as one unquoted string. For cf2024-1._domainkey.zerotool.dev, Cloudflare returned 425 characters with one " " join after the first 255-character string; Google returned 420 characters. Strip quotes only when they are present, and never insert a separator between segments.

Google's documentation notes that TXT records are encoded as a single JSON string even when the underlying record has multiple strings, and its own examples show quoted chunks. The practical rule is therefore: treat the data value as presentation text, remove the quoting the resolver added, and join segments without spaces.

NS, SOA and negative answers

NS records list the authoritative name servers for a zone. They tell you where the answer comes from and whether a registrar transfer or a provider migration left the delegation pointing at the wrong place. The TTL on the NS set is usually long (86,400 seconds is common), so a change can take a day to be seen everywhere.

SOA carries the zone's primary server, the responsible mailbox, the serial number, and four timers: refresh, retry, expire, and minimum (RFC 1035 §3.3.13). The serial is how secondaries notice a change — when a zone transfer is broken, comparing serials on the primary and the secondary is the fastest check.

The minimum field also controls negative caching. When a name does not exist, the authoritative server returns NXDOMAIN with the zone's SOA in the authority section. The negative answer is cacheable for the smaller of the SOA's own TTL and its MINIMUM field (RFC 2308 §5). A resolver that cached that NXDOMAIN keeps returning it until the timer expires, even after the zone is fixed. That is a common reason a browser lookup shows the correct record while one laptop keeps failing.

NXDOMAIN and NODATA are different. NXDOMAIN (Status 3) means the name does not exist. NODATA is NOERROR with zero answers: the name exists but has no record of the requested type. A CAA query for a domain without CAA returns NODATA, with the SOA in Authority; a query for a misspelled name returns NXDOMAIN. When you see NOERROR with zero records, the type is the wrong question — check NS for the zone you meant.

CAA

CAA (RFC 8659) tells public certificate authorities which of them may issue for a domain. A compliant CA checks CAA before issuance. If a CAA RRset exists and no issue property names the CA, that CA must not issue (RFC 8659 §3). If no CAA RRset exists, the domain places no CAA restriction on issuance.

A zone that allows Let's Encrypt and Google Trust Services and blocks wildcard certificates looks like this:

example.com. 0 issue "letsencrypt.org"
example.com. 0 issue "pki.goog"
example.com. 0 issuewild ";"
example.com. 0 iodef "mailto:security@example.com"

issuewild ";" denies all wildcard issuance. iodef tells CAs where to send a report when they receive a request from an unauthorised issuer. A CAA record is the only DNS query that reveals this restriction; forgetting to update it when you move to a CDN or a new CA is a classic cause of a failed renewal that looks like a TLS problem.

PTR and SRV

PTR maps an address back to a name. IPv4 reverse names live under in-addr.arpa with the octets reversed (RFC 1035 §3.5); IPv6 reverse names live under ip6.arpa with the nibbles reversed (RFC 3596 §2.5). Mail servers often check that the sending IP's PTR exists and matches the HELO name, which is why a missing PTR shows up as a deliverability problem rather than a DNS problem. A PTR alone does not prove ownership: the name should resolve forward to the same address.

SRV records publish a host and port for a service, with priority and weight, under names such as _xmpp-server._tcp.example.com (RFC 2782). Clients that support SRV try the lowest priority first and use weight to spread load among equals. If no SRV record exists, clients fall back to the service's well-known port on the domain, which is why some services work without SRV and others require it.

DNSSEC: the AD flag and EDE

DNSSEC adds signatures to DNS data. A validating resolver checks the chain from the root's trust anchor down to the zone, and reports the result in the AD (Authenticated Data) flag. RFC 4035 §3.2.3 defines when the flag may be set; RFC 6840 §5.8 adds that a resolver should set it only when the query also carried the DO or AD bit. That is why the tool sends do=1.

Without do=1, Cloudflare's AD flag varies. On 2026-09-30 we sent each query 30 times without it: example.com A, AAAA and NS came back "AD": false every time, and MX came back true every time. An earlier run of 20 A queries gave 10 true and 10 false. With do=1, and from Google either way, every answer had true. If you plan to read AD, send do=1.

A signed zone with a valid chain returns NOERROR and AD: true. An unsigned zone returns NOERROR and AD: false; that is not an error, it means the zone does not use DNSSEC. A zone with a broken chain returns SERVFAIL, and AD is false because there is no validated answer. SERVFAIL alone does not distinguish "DNSSEC is broken" from "the authoritative servers are unreachable"; the resolver's diagnostic does.

That diagnostic is the Extended DNS Error option (RFC 8914), a numeric code plus human-readable text. The codes that matter for DNSSEC are 1 (unsupported DNSKEY algorithm), 2 (unsupported DS digest type), 5 (indeterminate), 6 (bogus), 7 (signature expired), 8 (signature not yet valid), 9 (DNSKEY missing), 10 (RRSIGs missing) and 12 (NSEC missing). Cloudflare returns them in Comment as an array of strings such as EDE(9): DNSKEY Missing …. Google returns a sentence in Comment plus a structured extended_dns_errors array with info_code and extra_text. The tool normalises both into an EDE(n): text note under the records.

The documented test domain dnssec-failed.org shows the difference. On 2026-11-03, Cloudflare returned Status: 2 with Comment: ["EDE(9): DNSKEY Missing no SEP matching the DS found for dnssec-failed.org."]. Google returned Status: 2 with a Comment beginning "DNSSEC validation failure" and extended_dns_errors: [{ "info_code": 9, "extra_text": "No DNSKEY matches DS RRs of dnssec-failed.org" }]. Both are the same failure: the parent publishes a DS record, and the child has no DNSKEY that matches it.

cd=1 tells the resolver to skip validation. It is useful when you want to see the unvalidated data of a broken zone, and it is the wrong setting for a normal lookup. The tool always sends cd=0; use dig +cd when you need the other view.

Cloudflare vs Google: what actually differs

Both endpoints speak the same JSON schema, but they are different resolvers with different networks and different caches. The differences that matter in practice:

  • ECS. Google Public DNS normally sends approximate network information to authoritative servers, usually zeroing out the last part of the IPv4 address; edns_client_subnet=0.0.0.0/0 disables it. Cloudflare's FAQ says 1.1.1.1 does not send ECS. A CDN can therefore return different addresses through the two, and Google's answer depends on where the query comes from. On 2026-09-30, www.qq.com returned 121.14.77.201 and 121.14.77.221 for 114.114.114.0/24, 43.159.109.55 for 8.8.8.0/24, and 43.168.224.173 for 139.130.4.0/24 from Google; Cloudflare ignored the same parameter and returned 43.159.109.55.
  • TXT presentation. Cloudflare quotes each string and separates segments with a space; Google returned one unquoted string in our 2026-11-03 query. Google's documentation shows quoted examples too, so treat quoting as presentation, not as a contract.
  • Diagnostics. Cloudflare's Comment is an array of EDE strings. Google's Comment is a sentence, and its structured extended_dns_errors array carries the code and text. Google also adds Comment: "Response from <IP>." for an uncached answer, naming the authoritative server it asked.
  • DNSSEC record text. With do=1, both include RRSIG records in Answer. The RRSIG text is not byte-identical: in our 2026-11-03 query Google lowercased the covered type mnemonic (a 13 2 …), Cloudflare uppercased it (A 13 2 …).
  • Order and names. RRsets are unordered, and the two resolvers return them in different orders. Do not compare two answers position by position; compare the sets.
  • HTTP caching. In the same query, Google's response carried cache-control: private, max-age=300; Cloudflare's did not. A repeat query can therefore be served from the browser or an intermediary cache for up to five minutes.

The TTLs differ too, because each resolver's cache started at a different time. That is expected, not a sign that one of them is wrong.

Why the browser and the system resolver disagree

A DoH lookup answers a different question from dig on your laptop. The differences are not bugs:

  • Vantage point. dig asks the resolver configured in the OS (or the server you name). The DoH call asks Cloudflare or Google. Each has its own cache, so one can hold an old record while the other has the new one.
  • Hosts file and local overrides. dig and nslookup send DNS queries; they do not normally read /etc/hosts. Normal application lookups do, through the OS resolver, and a VPN or a local DNS proxy can rewrite answers. A public DoH resolver sees none of that.
  • Split-horizon DNS. Corporate and VPN zones return internal addresses to clients inside the network and NXDOMAIN outside. The DoH query sees the outside view, so an internal name that works at the office returns NXDOMAIN here.
  • Search domains. The OS may complete a bare hostname with a search suffix; the DoH endpoints require the full name.
  • Browser Secure DNS. Chrome, Edge and Firefox can use their own DoH resolver for the hostnames the browser resolves, including the resolver's own hostname. That setting changes which resolver answers for navigation; it does not change the resolver that the DoH request itself asks.
  • The bootstrap problem. The page must resolve cloudflare-dns.com or dns.google through the normal network path before it can send the DoH query. A content filter or captive portal that blocks those names prevents the lookup, even though the query itself would be encrypted.

This is why a Pi-hole, NextDNS or AdGuard Home filter can make the tool useful (it sees the public answer while the local filter blocks) and misleading (the domain works in the tool while your network blocks it). It is also why a proxy app that answers port 53 in fake-IP mode can make dig print an address such as 198.18.2.147 from the benchmark range (RFC 6890 §2.2.2) while the DoH query returns the real one.

Common misdiagnoses

"It is still propagating." Usually it is caching, and the TTL tells you how long. Check the TTL on the record and query a second resolver; if one has the new value and the other the old, you are watching cache expiry, not a broken zone.

"DNS is broken because one machine fails." Check for a cached NXDOMAIN from an earlier misconfiguration. RFC 2308 §5 lets a resolver cache the negative answer for the SOA minimum, and the fix is to wait or to lower the SOA minimum before the change.

"The CDN is returning the wrong IP." The DoH answer reflects the resolver's network position, not yours. Google's ECS hint moves the answer closer to the subnet you name; Cloudflare's does not. For "what does a user in São Paulo see?", query from that region.

"DNSSEC is fine because the site loads." A validating resolver can fail while a non-validating one succeeds. A SERVFAIL with an EDE code is the signature of a validation failure; a SERVFAIL without one is more likely an unreachable authoritative server.

"The CNAME is missing." The resolver followed it and returned A/AAAA records, or the zone uses CNAME flattening at the apex. Query the alias itself and read the name field of each answer.

"The TXT record is truncated." It is multiple 255-byte strings. Remove the quotes and join the segments without a separator.

"There is no MX, so mail cannot work." SMTP falls back to an implicit MX on the domain's A/AAAA (RFC 5321 §5.1). A Null MX (0 .) is the explicit "no mail" answer.

"There is no CAA record, so nobody can issue." The opposite: no CAA RRset means no CAA restriction. A CAA RRset that omits a CA is what blocks that CA.

Running the same query yourself

The tool exists because clicking beats scripting for one-off lookups. For automation, the JSON profile is short enough for any language with fetch.

The browser or Node 18+ version:

const url = `https://cloudflare-dns.com/dns-query?name=${encodeURIComponent('zerotool.dev')}&type=MX&do=1&cd=0`;
const res = await fetch(url, { headers: { accept: 'application/dns-json' } });
const json = await res.json();
console.log(json.Answer); // [{ name, type, TTL, data }, ...]

Add AbortSignal.timeout(5000) for a timeout and a try/catch for network failures. Both providers return the same overall shape, so switching providers means changing the URL and the resolver-specific parameters.

Python with the standard library:

import json
import urllib.request

def doh(name: str, qtype: str, resolver: str = "cloudflare"):
    if resolver == "google":
        url = f"https://dns.google/resolve?name={name}&type={qtype}&cd=0"
        headers = {}
    else:
        url = f"https://cloudflare-dns.com/dns-query?name={name}&type={qtype}&cd=0"
        headers = {"accept": "application/dns-json"}
    req = urllib.request.Request(url, headers=headers)
    with urllib.request.urlopen(req, timeout=5) as resp:
        return json.loads(resp.read())

print(doh("zerotool.dev", "CAA"))

For shell scripts and CI steps, curl plus jq:

curl -s -H 'accept: application/dns-json' \
  'https://cloudflare-dns.com/dns-query?name=cloudflare.com&type=MX' \
  | jq -r '.Answer[] | select(.type == 15) | "\(.data)"' | sort

The select(.type == 15) filter matters when do=1 is set: the answer also contains RRSIG records, and a naive .[] prints them too.

Where this fits among DNS lookup tools

DNS Checker queries "a selected list of DNS servers in multiple regions worldwide" from its own servers and draws a propagation map. It answers "has this change reached every region yet?".

Google Admin Toolbox Dig sends the query to its own backend (/apps/dig/lookup). In a test on 2026-09-29 it showed "Record not found!" for dnssec-failed.org, with rcode SERVFAIL only in its raw view, and its flags line for the signed example.com read QR RD RA, without AD.

dig and kdig are the CLI reference implementations, the right answer for scripting and for queries that need authoritative-server targeting (dig @ns1.example.com).

ZeroTool's tool fills the in-between case: a developer who wants a quick lookup from the browser, on a machine where installing dig would mean adding a Homebrew package or a WSL distro, and who wants the public resolver's own answer rather than one relayed by a lookup site's server. You can switch between Cloudflare and Google and compare, see the AD flag and the resolver's notes, and copy the raw JSON. It is not the right tool for propagation maps or authoritative-only queries.

Further reading

Internal:

External: