DNS Record Types Explained: From A and MX to CAA and TXT
A DNS zone is a small database, and every record type in it answers a different question. The ones you will actually encounter, with their real-world roles:
- A / AAAA: map a hostname to an IPv4 / IPv6 address. This is the foundation of web access — if these are wrong, nothing else matters.
- CNAME: an alias pointing one name at another, such as www pointing at the apex domain. Not allowed on the zone apex (use A or ALIAS/ANAME there), and a name with a CNAME cannot carry other records.
- MX: decides which servers receive email for the domain. The priority number matters — the lowest value is tried first, and a lone MX pointing at a dead host silently eats all incoming mail.
- TXT: free-form text, and the home of SPF, DKIM and domain-ownership verification tokens used by Google, Microsoft and dozens of other services.
- NS: the authoritative nameservers for the zone. A mistake here takes the entire domain offline, because nothing else in the zone can even be found.
- SOA: zone management metadata — serial number, refresh/retry/expiry timers and the negative-caching TTL. The serial must increase on every edit for secondary nameservers to pick up changes.
- CAA: declares which certificate authorities are allowed to issue certificates for the domain. A cheap, often-overlooked security layer: with
example.com. CAA 0 issue "letsencrypt.org", no other CA will (and should) issue for you.
A couple of operational habits prevent most record-level incidents. First, keep SPF, DKIM and DMARC in sync: adding a new email service without updating TXT records is the classic cause of mail going to spam. Second, remember that subdomains can have their own records — www and the apex often differ, and a CNAME on one does not imply anything about the other.
Whenever a record is added or changed, verify propagation from several locations afterwards — especially for MX and NS, where mistakes are costly: broken MX stops all email, broken NS stops everything. The WhoDNS DNS check displays the full record set for any domain in one view, which makes it easy to spot a missing MX, a dangling CNAME or a CAA record that will block your next certificate renewal.
🔗 Related tool: Inspect all DNS records of a domain