DNS Records Explained: A, AAAA, MX, TXT, CNAME and More
DNS, the Domain Name System, is the internet's phone book. It translates names like example.com into the addresses and settings computers need. Each entry in that phone book is a record, and there are a handful of types you will meet again and again.
The record types that matter
| Type | What it does | Example value |
|---|---|---|
| A | Maps a name to an IPv4 address | 203.0.113.10 |
| AAAA | Maps a name to an IPv6 address | 2001:db8::10 |
| CNAME | Makes one name an alias of another | www → example.com |
| MX | Says which servers receive email | 10 mail.example.com |
| TXT | Holds text such as SPF, DKIM, DMARC and verification codes | v=spf1 include:_spf.example.com ~all |
| NS | Lists the nameservers that control the domain | ns1.example.net |
| SOA | Zone details: primary server, admin contact, serial and timers | ns1.example.net hostmaster.example.com … |
| CAA | Restricts which certificate authorities may issue certificates | 0 issue "letsencrypt.org" |
| PTR | Reverse lookup: maps an IP address back to a name | mail.example.com |
TTL: how long answers are cached
Every record has a time to live (TTL), in seconds. Resolvers keep an answer for that long before asking again. A low TTL such as 300 makes changes appear quickly. A high TTL such as 86400 reduces lookups. If you plan to move a site, lower the TTL a day ahead of time.
Setting up a website
Point the bare domain to your server with an A record (and an AAAA record if you support IPv6). Point www to the bare domain with a CNAME. A CNAME cannot sit at the root of a domain alongside other records, so many DNS providers offer an “ALIAS” or “flattened CNAME” for that case.
Setting up email
- MX records list your mail servers. Lower numbers mean higher priority.
- SPF (a TXT record) lists which servers may send mail for you.
- DKIM (a TXT record on a selector name) publishes a key so recipients can verify signatures.
- DMARC (a TXT record at
_dmarc.yourdomain) tells receivers what to do with mail that fails checks.
Why your changes do not show up
Caching. Resolvers hold old answers until the TTL expires, so a new record can take minutes or hours to be visible everywhere. Query two different resolvers to compare. Our DNS lookup lets you switch between Cloudflare and Google.
Check any domain
Try the DNS lookup on your own domain to see all of these records at once, and use WHOIS to see the registrar and nameservers that control them.
Try it yourself
See the real numbers for your own connection with our free tools.