DNS Record Types
Quick reference to A, AAAA, CNAME, MX, TXT, NS, SOA and when to use each.
What are DNS record types?
Definition
DNS records are instructions stored at authoritative name servers that tell resolvers how to handle a domain— which IP it should point to, which servers receive email, what aliases exist, and more.
If DNS is the internet’s phonebook, records are the entries. Each record type serves a specific job. Below are the ones you’ll see most often in lookups and dashboards.
New to DNS? Start with what DNS is and how it works →
A and AAAA: point names to IPs
These are the backbone of web routing. A maps a hostname to an IPv4 address, while AAAA maps to IPv6.
Examples
- example.com. A 93.184.216.34
- example.com. AAAA 2606:2800:220:1:248:1893:25c8:1946
Tip: Prefer AAAA when your service supports IPv6 to improve reachability and future‑proofing.
Curious about address formats? Compare IPv4 vs IPv6 →
CNAME: create clean aliases
A CNAME makes one hostname an alias of another. The resolver follows the target’s records until it reaches an A/AAAA result.
Example
www.example.com. CNAME pages.hosting.example.
- • Don’t set a CNAME at the zone apex (root) if your DNS provider doesn’t support ALIAS/ANAME.
- • Keep CNAME chains short—long chains slow lookups.
MX and TXT: email routing and trust
MX records tell the world which mail servers accept mail for your domain. TXT records carry policies and verification data like SPF and DKIM.
MX basics
- • Prefer lower numbers: 10 mx1.mailhost.example. over 20 mx2…
- • Targets must resolve to A/AAAA (not CNAMEs by spec).
TXT uses
- • SPF: v=spf1 include:_spf.example.com ~all
- • DKIM: selector._domainkey TXT (public key)
- • Verification tokens for services and ownership.
For interpreting full lookup results, see Understanding your lookup results →
NS and SOA: zone delegation and authority
NS records delegate your zone to the authoritative name servers. The SOA record contains metadata like the zone serial and refresh intervals that secondaries honor.
What to check
- NS set matches your registrar configuration and at least two servers are listed.
- SOA serial increments on changes; refresh/retry/expire are reasonable for your update cadence.
Best practices
- Use sane TTLs: Lower during migrations; raise once stable to reduce query load.
- Keep roots simple: At the zone apex prefer A/AAAA or ALIAS/ANAME if supported.
- Avoid long CNAME chains: They add latency and introduce failure points.
- Document email changes: MX/TXT edits affect deliverability—plan and verify.
Key takeaways
Remember:
- A/AAAA map names to IPs; CNAME creates aliases; MX/TXT handle email routing and policies; NS/SOA define zone authority.
- Avoid CNAMEs at the root unless your provider supports ALIAS/ANAME.
- Check TTLs and email records carefully before go‑lives to prevent outages.