DNS Record Types Explained: A, AAAA, MX, TXT, NS, CNAME, SOA, CAA
A clear cheat sheet for the DNS records you actually edit in production — what each type does, who queries it, and how to look them up safely.
You changed DNS an hour ago. The app still points at a decommissioned VM. The deploy is fine — the A record is not.
Eight record types cover most production fires: A, AAAA, MX, TXT, NS, CNAME, SOA, and CAA. Learn what each one does, who reads it, and how to query it before you edit a live zone.
First failure mode: wrong control plane
“I updated DNS but nothing changed” almost always means you edited a zone that is not authoritative. Compare registrar NS delegation to the nameserver that hosts your zone file. Fix delegation first, then records.
dig +short NS example.com
When NS at the registrar does not match where you logged in, you are painting over the wrong wall.
Before any cutover, read what is published:
- Open the DNS lookup.
- Query the hostname or apex you care about.
- Inspect each record class separately — A, MX, and TXT are independent answers.
- Confirm authoritative nameservers match registrar delegation.
A and AAAA
| Type | Purpose |
|---|---|
| A | Maps a name to an IPv4 address |
| AAAA | Maps a name to an IPv6 address |
Dual-stack origins need both when you want IPv6 clients to reach you. IPv4-only? AAAA can stay empty. A stale A after a VM kill is a silent outage — monitoring green, users red.
CNAME
CNAME aliases one name to another. Common for www → apex, or app → a CDN hostname.
Hard rules:
- A CNAME owner name generally cannot also hold A, MX, or TXT on the same label
- Apex CNAME support varies; many hosts use ALIAS/ANAME instead
Use the CNAME checker when you only need alias validation.
MX
MX lists hosts that accept mail for the domain. Lower preference number is tried first.
example.com. MX 10 mail.provider.com.
MX targets should resolve to A/AAAA. Wrong MX after a “quick cleanup” is how inbound mail vanishes.
TXT
TXT holds arbitrary text. Production uses:
- SPF (
v=spf1 ...) - DKIM (
v=DKIM1; ...onselector._domainkey) - DMARC (
v=DMARC1; ...on_dmarc) - SaaS verification tokens
- Site-verification strings
Multiple TXT records on one name are normal. Multiple SPF strings on the apex are not — receivers may permerror.
NS
NS names the authoritative servers for a zone. Registrar delegation and zone NS must agree. Pair with who owns the domain when ownership and delegation both look wrong.
SOA
SOA is zone metadata: primary NS, admin mailbox, serial, refresh/retry/expire, negative-cache TTL. You rarely hand-edit SOA on managed DNS, but serial bumps still tell you secondaries saw a change.
CAA
CAA lists which CAs may issue certificates for the domain. It will not stop a compromised CA globally, but it blocks accidental issuance from CAs you never use. After a CAA change, run a real issuance and an SSL certificate check.
Quick decision table
| Goal | Record to touch |
|---|---|
| Point site at a server / LB | A / AAAA (or ALIAS) |
| Point hostname at CDN/SaaS | CNAME (or apex alias) |
| Receive email | MX (+ SPF/DKIM/DMARC TXT) |
| Prove domain ownership | TXT (sometimes CNAME) |
| Change DNS host | NS at registrar + zone NS |
| Restrict cert issuance | CAA |
Cutover playbook (short)
- Inventory current A/AAAA/CNAME/MX/TXT for names you will touch
- Lower TTLs a day ahead
- Apply new records in a maintenance window
- Verify with DNS lookup against authoritative NS
- Verify HTTPS on the new target
- Raise TTLs once stable
Mail cutovers: switch MX only when the new platform accepts mail for your domain, and keep SPF/DKIM aligned if both paths send during migration.
Orphan CNAME records outlive the SaaS trial that created them. Document who owns each subdomain.
Verification TXT failures are DNS and HTTP problems — see why your domain may show unverified.
Records you meet later
SRV, PTR, HTTPS/SVCB, DNSSEC types (DNSKEY, RRSIG, DS) matter when your stack asks for them. Most web and email cutovers still fail on A/AAAA, CNAME, MX, TXT, or NS first.
Prefer an explicit DNS lookup over a single ISP screenshot. Compare against registrar NS so you are not editing a ghost zone.
FAQ
Is CNAME better than A?
Use A/AAAA when you control stable IPs. Use CNAME when a vendor tells you to alias to their hostname.
Do I need AAAA?
Only if you want IPv6 reachability. Many CDNs turn it on at onboarding.
Which record breaks HTTPS?
DNS does not store certs. Wrong A/CNAME targets send users to hosts whose SANs do not match — that looks like “SSL is broken.”
Who can change NS records?
Usually whoever controls the registrar account. Delegation and zone NS must match.
Summary
Query NS before you blame propagation. A/AAAA and CNAME control where traffic lands. MX and TXT own mail delivery and authentication. CAA gates certificate issuance. When something breaks after a DNS change, read authoritative answers first — then edit one record class at a time.