DNS
DNS Lookup Explained: A, AAAA, MX, TXT & CNAME Records
Published October 30, 2026 · Current as of November 2026
1. What DNS Is: The Internet's Phone Book
The Domain Name System (DNS) is the internet's phone book. Humans remember names like bizsecuritytools.com; computers connect using numbers called IP addresses. DNS is the distributed directory that translates the name into the address — for every website you visit, every email you send, and every API your software calls. A DNS lookup is the act of asking that directory for the records attached to a domain name.
DNS is organized as a hierarchy of zones, each delegated to a server that holds authoritative data for its part of the tree: the root zone (the trailing dot, ".") delegates to top-level domains (TLDs) like .com and .org; each TLD delegates to the authoritative nameservers of individual domains; those servers hold the actual records. When you query www.example.com, the answer can only come from the server that authoritatively hosts example.com — every other server in the chain just points toward it. This delegation design is why a single registrar, host, or attacker cannot rewrite someone else's zone: authority is unambiguous and scoped.
Between your device and the authoritative server sit recursive resolvers — usually run by your ISP, your router, or a public service like Cloudflare's 1.1.1.1 or Google's 8.8.8.8. The resolver is the middleman: it takes your question, does the legwork of walking the hierarchy, and hands back an answer it caches so the next lookup for the same name is fast.
2. What Is a DNS Record? The Types That Matter
A DNS record is a single entry in a zone that maps a name to a piece of data. Each record's type tells DNS what kind of data it carries. The types below are the ones you will actually encounter — running a website, sending email, or troubleshooting a domain:
- A — "Address." Maps a hostname to a 32-bit IPv4 address, e.g.
cloudflare.com→104.16.x.x. Defined in RFC 1035, the original DNS specification. - AAAA — "Quad-A." The same job for IPv6, mapping a hostname to a 128-bit address. Defined in RFC 3596. A domain that wants to be reachable over IPv6 needs AAAA records in addition to (or instead of) A records.
- CNAME — "Canonical Name." An alias: it points one name at another name, and the client follows that target's A/AAAA records. For example,
www.example.comis often a CNAME forexample.comso both names load the same site. - MX — "Mail Exchange." Tells mail servers where to deliver email for the domain. Each MX record carries a preference number — lower numbers are tried first — plus the hostname of the mail server. If the domain's email is hosted by a provider, the MX records point at that provider.
- TXT — "Text." Arbitrary text attached to a name. This is where SPF, DKIM, and DMARC records live, and where you put verification strings for Google Workspace, Microsoft 365, and certificate issuance. TXT records are how the world proves "this domain really controls this policy."
- NS — "Name Server." Declares which servers are authoritative for a zone. NS records appear both at the TLD (the delegation) and inside the zone itself.
- SOA — "Start of Authority." Every zone has exactly one — the zone's metadata: the primary nameserver, the administrator's contact, a serial number that increments on every change, and timing values like the negative-caching TTL.
- PTR — "Pointer." The reverse of an A/AAAA record: it maps an IP address back to a hostname in the reverse zones
in-addr.arpa(IPv4) andip6.arpa(IPv6). Reverse DNS is what mail servers check to verify a sending server's identity. - SRV — "Service." Locates a specific service — a protocol, a port, a host — in one record. The name format is
_service._protocol.name, e.g._sip._tcp.example.com. Defined in RFC 2782 (2000), SRV is widely used by Microsoft 365's Autodiscover, SIP, and LDAP. - CAA — "Certification Authority Authorization." The domain publishes which certificate authorities (CAs) may issue TLS certificates for it. A CAA record of
issue "letsencrypt.org"tells every CA: only Let's Encrypt may issue here. Defined in RFC 8659 (2019), CAA became mandatory policy for public CAs in late 2017 — CAs must check it before issuing, or risk misissuance. It is your cheap insurance against a rogue certificate for your domain.
| Type | Purpose | Example |
|---|---|---|
| A | IPv4 address for a hostname | site → 192.0.2.10 |
| AAAA | IPv6 address for a hostname | site → 2001:db8::1 |
| CNAME | Alias to another hostname | www → site |
| MX | Inbound mail server (with priority) | 10 mail.provider.com |
| TXT | Text: SPF, DKIM, DMARC, verification | v=spf1 include:_spf.provider.com |
| NS | Authoritative nameservers for the zone | ns1.provider.com |
| SOA | Zone metadata + serial number | — |
| PTR | Reverse map: IP → hostname | 1.2.0.192.in-addr.arpa |
| SRV | Service location: host + port | _sip._tcp → 5060 sip.example.com |
| CAA | Which CAs may issue TLS certs | issue "letsencrypt.org" |
Two of these types deserve extra attention because they carry your email security and your TLS certificate posture. The TXT-record trio — SPF, DKIM, and DMARC — is the entire defense against someone spoofing your domain in email, and CAA stops a certificate from being issued for your domain behind your back. Both deserve their own deep dives: SPF, DKIM & DMARC explained and the complete DMARC setup guide walk through those records record-by-record.
3. How a DNS Lookup Actually Works, Step by Step
When you type https://www.example.com and hit Enter, here is the chain of events — from the perspective of your device and the recursive resolver:
- Local caches first. Your operating system checks its resolver cache and your browser checks its own DNS cache. If a recent lookup already answered this name, you are done — this is why a DNS change can seem to "not work yet" on the machine that cached the old answer.
- Your recursive resolver gets the question. Your device sends the query to the resolver configured on your network (your router, your ISP, or a public resolver like 1.1.1.1 or 8.8.8.8). The resolver checks its own cache first.
- Root servers. On a cache miss, the resolver queries a root nameserver. The root does not know
example.com, but it replies with a referral: "ask the .com TLD servers, here they are." - TLD servers. The resolver queries a .com TLD server. The TLD does not know the answer either, but it refers the resolver to the authoritative nameservers for
example.com. - Authoritative servers. The resolver queries the authoritative nameserver, which holds the actual records. It answers with the A (and/or AAAA) record for
www.example.com— say,192.0.2.10. - Answer + cache. The resolver returns the IP address to your device, and caches the answer for the record's TTL so the next query is served from cache. Your browser opens a connection to that IP — and the DNS lookup is over.
The work the resolver does in steps 3–5 — iterating from root to TLD to authoritative, following referrals — is called iterative resolution. From your device's point of view the whole process is recursive: you asked one server for a complete answer and it returned one. Two labels, same lookup. Most of the time the resolver's cache short-circuits the walk entirely, which is why repeat visits to a site resolve in milliseconds.
4. Common DNS Record Gotchas
Most DNS breakage comes from a small set of recurring mistakes. Knowing these four will save you the classic "why is my site/email down" afternoon.
CNAME at the apex
RFC 1034 is explicit: if a CNAME record is present at a name, no other data may be present at that name. The apex of a domain — the bare example.com — must carry NS and SOA records, so a CNAME cannot technically live there without breaking the standard (RFC 1912 calls out the operational consequences). In practice, hosting providers work around this with CNAME flattening: they record the CNAME but return the target's resolved A/AAAA records instead, so the zone stays RFC-valid. If your provider offers "ALIAS" or "ANAME" records, that is their version of the same trick. The practical rule: put a CNAME on www, use an A/AAAA record (or a flattening alias) on the apex.
MX pointing at a CNAME
RFC 2181 says the host named in an MX record's value must not be an alias. If your MX record points at a CNAME, mail servers are allowed to treat the record as broken, and many will. Every MX target should be a real hostname with its own A/AAAA record — typically the hostname your email provider assigns you.
TTL: what it is, and what propagation really is
TTL — Time to Live — is the number of seconds a resolver may cache a record before it must ask again (RFC 1035). It is not a countdown on your zone; it is a lease granted to every resolver that caches your answer. Low TTLs (300–600 seconds) mean changes travel fast but lookups hit your authoritative servers more often; high TTLs (86,400 seconds) mean fewer queries but slower change adoption. A common workflow: lower the TTL before a planned change, make the change, then raise it back once the old values have expired everywhere.
Which brings us to propagation — the most misunderstood word in DNS. Propagation is not a network-wide sync; it is simply each caching resolver's TTL timer expiring at its own pace. There is no "DNS now knows" moment. That is why, after you change a record, some places see the new value immediately and others keep the old one for up to the old TTL. It is also why "checking with a propagation checker" sometimes shows different results from different locations — different resolvers, different caches. The distinction matters: if a record was typed incorrectly at the authoritative server, no amount of propagation will fix it — the record is simply wrong, and "propagation wait" is wasted time. Our DNS propagation checker shows the old-vs-new split across locations so you can tell the difference.
5. How to Look Up DNS Records Yourself
You have three practical ways to run a DNS lookup, from command line to click:
dig (Linux/macOS, and Windows 10+ via WSL)
dig example.com A returns the A record; swap the type for any other (MX, TXT, CAA…). The +short flag strips dig's verbose headers for a clean answer, and ANY is no longer reliable as "give me everything" — public resolvers refuse it and the IETF deprecated it. Query the authoritative server directly (from the NS records) to see the zone's true answer, cache-free.
nslookup (everywhere)
The older, simpler workhorse, still included with Windows, macOS, and most Linux distributions. nslookup -type=MX example.com shows the MX records, and nslookup with no arguments drops you into an interactive prompt.
A browser-based lookup tool
No terminal handy? The BizSecurityTools DNS lookup tool queries the public DNS-over-HTTPS infrastructure and returns every record type above — A, AAAA, CNAME, MX, TXT, NS, SOA, SRV, CAA — for any domain, with TTLs, in one screen. Type a domain, pick a type, get an answer.
Look Up Any Domain's Records — Free
Free tool. No sign-up. Check A, AAAA, CNAME, MX, TXT, NS, SOA, SRV, and CAA records for any domain in seconds.
Look Up Any Domain →Related Tools
Related Guides
Sources
- RFC 1034 — Domain Names: Concepts and Facilities (1987; CNAME rule §3.6.2)
- RFC 1035 — Domain Names: Implementation and Specification (1987; A, MX, NS, SOA, PTR, TXT, TTL)
- RFC 1912 — Common DNS Operational and Configuration Errors (1996)
- RFC 2181 — Clarifications to the DNS Specification (1997; aliases as NS/MX values)
- RFC 2782 — A DNS RR for Specifying the Location of Services (SRV, 2000)
- RFC 3596 — DNS Extensions to Support IP Version 6 (AAAA, 2003)
- RFC 8659 — DNS Certification Authority Authorization (CAA, 2019)
- Cloudflare Learning Center — What is DNS? / DNS server types
- Cloudflare Learning Center — What is a DNS CNAME record?
This guide is informational and is not legal advice. Current as of November 2026.