DNS Records Explained: A, AAAA, CNAME, MX, TXT, and NS
DNS is the internet's phone book. It translates human-friendly domain names (example.com) into machine-readable IP addresses (93.184.216.34).
But DNS is more than just address lookup. It handles email delivery, domain verification, SSL configuration, and much more — all through different record types.
This guide covers the six most common DNS records you'll encounter.
1. A Record
The A record (Address Record) maps a domain to an IPv4 address.
example.com A 93.184.216.34
This is the most fundamental DNS record. If your domain doesn't have an A record, your website won't load.
Use case: Pointing your domain to your web host's server IP.
2. AAAA Record
The AAAA record is the IPv6 equivalent of the A record.
example.com AAAA 2606:2800:220:1:248:1893:25c8:1946
IPv6 is the newer version of the internet protocol. Modern sites often have both A and AAAA records so they can serve users on either protocol.
3. CNAME Record
A CNAME record (Canonical Name) points a domain to another domain, not an IP.
blog.example.com CNAME example.com
Common uses:
- CDN setups (point your domain to a Cloudflare or Fastly hostname)
- Subdomain aliases
- Third-party hosting (GitHub Pages, Vercel, Netlify)
Important: A CNAME should not coexist with other records for the same name.
4. MX Record
An MX record (Mail Exchanger) tells the world where to deliver email for your domain.
example.com MX 10 mail.example.com
The number (10) is a priority. Lower numbers get tried first. Multiple MX records provide redundancy.
Use case: Setting up Google Workspace, Microsoft 365, or any business email on your domain. If your MX records are wrong, email will bounce.
5. TXT Record
A TXT record stores arbitrary text. It's used for:
- Domain verification — Google Search Console, Microsoft, and others verify ownership via TXT records
- SPF — anti-spam configuration for email
- DKIM — email signing
- DMARC — email policy
example.com TXT "v=spf1 include:_spf.google.com ~all"
6. NS Record
NS records tell the internet which name servers are authoritative for your domain.
example.com NS ns1.cloudflare.com
example.com NS ns2.cloudflare.com
When you change hosting, you usually update your NS records at the registrar level. This delegates DNS control to your new provider.
How to Check DNS Records
The easiest way is to use our free DNS lookup tool. It queries all six record types at once and shows the results cleanly.
You can also check DNS from the command line:
# Windows
nslookup example.com
# macOS / Linux
dig example.com
Common DNS Problems
Website Not Loading
Check the A record — it should point to your server's IP. If it's missing, the site won't resolve.
Email Not Arriving
Check MX records — they should point to your email provider. Also check TXT records for SPF and DKIM.
CDN Not Working
Check CNAME records — they should point to the CDN's hostname, not your origin server.
DNS Changes Not Propagating
DNS changes take 10 minutes to 24 hours to fully propagate worldwide. Use our DNS checker to see current propagation.
Summary
| Type | Purpose |
|---|---|
| A | Domain → IPv4 address |
| AAAA | Domain → IPv6 address |
| CNAME | Domain → another domain (alias) |
| MX | Email routing |
| TXT | Verification, SPF, DKIM, DMARC |
| NS | Name server delegation |
Understanding DNS is essential for anyone who runs a website. Use our DNS lookup tool to quickly check any domain's records.