DNS records
A DNS server answers questions about a domain name such as example.com: the address of its web server, the servers that take its mail, the certificate authorities allowed to issue for it. Each answer comes from a resource record, and the set of records for a domain is its zone. Records are public by design. Anyone on the internet can ask for them, so a zone also works as a map of the services a domain uses and where they run.1
Parts of a record
Every record has an owner name, a class (almost always IN, for internet), a type and the data the type defines.2 It also carries a time to live (TTL): the number of seconds a resolver may keep the answer in its cache before it asks again.2 A record changed or deleted at the source can still be served from caches until its TTL has passed. Records written in the text format that DNS servers load look like this:
example.com. 300 IN A 203.0.113.10
www.example.com. 300 IN CNAME example.com.
example.com. 3600 IN MX 10 mail.example.com.
example.com. 3600 IN TXT "google-site-verification=..."
example.com. 86400 IN NS ns1.example.net.
example.com. 86400 IN CAA 0 issue "ca1.example.net"Common types
| Type | Holds | What an outsider learns |
|---|---|---|
| A | One IPv4 address; a host with several addresses has several A records2 | The IP address of the server, unless a proxy answers in its place |
| AAAA | One IPv6 address3 | The same, for IPv6 |
| CNAME | The real name behind an alias2 | Which hosting service or online product a subdomain runs on |
| MX | A mail server and a preference number; lower values are preferred2 | The mail provider, or the address of a self-hosted mail server |
| TXT | Free text whose meaning depends on where it sits2 | Email sending services and the products whose ownership checks the domain passed |
| NS | A server that answers authoritatively for the domain2 | The DNS provider |
| CAA | The certificate authorities permitted to issue for the name4 | The certificate authority in use |
A CNAME cannot sit next to any other record on the same name. If shop.example.com is an alias, it cannot also have its own A or MX record.5 A CAA record binds certificate authorities: one that finds a CAA record for a name must refuse to issue unless the request matches it.4
What the records reveal
The server behind a proxy
A CDN or Reverse proxy such as Cloudflare hides a server by answering A, AAAA and CNAME queries with its own shared addresses. Only those three types can be proxied; MX and TXT records are always DNS-only and returned as written.1 When a record that is not proxied points at the same machine as a proxied one, a single lookup gives away the real address. An example is a website and its mail on one server: the MX target resolves straight to the box.6 An attacker who has that address can send traffic to the server directly and skip the proxy's firewall rules and DDoS protection.1
Services in TXT records
Many systems keep their settings in TXT records. SPF policies are read from TXT records,7 and a policy lists every service allowed to send mail for the domain (see Email authentication (SPF, DKIM and DMARC)). Ownership checks add more records. Google Workspace asks for a TXT value beginning google-site-verification=, and states that the record can be removed once the domain is verified.8 Records left behind after such checks tell an outsider which products the domain has signed up for.
Zone transfers
A zone transfer (AXFR) copies the entire zone from one DNS server to another, and the dig tool can request one.9 A server that grants transfers to anyone hands out every name in the zone in one reply. The current specification says a general-purpose DNS server should not default to allowing transfers to all.10 Other ways to list a domain's names are in Subdomain enumeration.
Dangling records
A record outlives the service it points at unless someone deletes it. When a CNAME still names a hosting service after the site there was removed, another customer of that service can claim the name and serve pages on the subdomain: a Subdomain takeover. To prevent it, claim the host at the provider before creating the record, and delete the record before shutting the host down.11
Reading records
The dig command takes a name and a type, and optionally the server to ask:9
dig example.com MX
dig example.com TXT
dig @ns1.example.net example.com AXFRThe last line asks the server for a zone transfer. A server that limits transfers to addresses its administrator chose refuses it.10
In SecFlash
On the Security page, SF-SEC-304 lists the subdomains found, SF-SEC-308 reports one that can be taken over, and SF-SEC-309 reports a record pointing at a name that no longer exists. On the Cloud page, SF-CLD-304 and SF-CLD-306 report Cloudflare records that show or bypass the server behind the proxy. The Email and domain page reports a missing CAA record as SF-EML-203 and a missing SPF record as SF-EML-101.
See also
- DNSSEC
- Domain hijacking
- Email spoofing
- Setting up SPF, DKIM and DMARC
- MTA-STS and TLS-RPT
- Look-alike domains
- TLS certificates
- Category: Security concepts
References
- a b c Cloudflare (n.d., read 22 November 2026). "Proxy status". Cloudflare DNS docs.
- a b c d e f g Mockapetris, P. (November 1987). "Domain Names: Implementation and Specification". RFC 1035. IETF.
- back Thomson, S. et al. (October 2003). "DNS Extensions to Support IP Version 6". RFC 3596. IETF.
- a b Hallam-Baker, P., Stradling, R. and Hoffman-Andrews, J. (November 2019). "DNS Certification Authority Authorization (CAA) Resource Record". RFC 8659. IETF.
- back Barr, D. (February 1996). "Common DNS Operational and Configuration Errors". RFC 1912. IETF.
- back Cloudflare (n.d., read 22 November 2026). "Exposed IP addresses". Cloudflare DNS docs.
- back Kitterman, S. (April 2014). "Sender Policy Framework (SPF) for Authorizing Use of Domains in Email". RFC 7208. IETF.
- back Google (n.d., read 22 November 2026). "Verify your domain with a TXT record". Google Workspace Admin Help.
- a b Internet Systems Consortium (n.d., read 22 November 2026). "Manual Pages: dig". BIND 9 documentation.
- a b Lewis, E. and Hoenes, A. (June 2010). "DNS Zone Transfer Protocol (AXFR)". RFC 5936. IETF.
- back MDN contributors (10 September 2025). "Subdomain takeover". MDN Web Docs.