DNS Record Types Explained: A, AAAA, CNAME, MX, TXT and More

2026-09-26 · IPV4 Scanner

Your domain's DNS is a set of records, and each type does one job. Most people meet them the hard way, when something's broken and a support page tells them to "add a CNAME" with no explanation of what that is or why. Here's what each of the common ones actually does, and the handful of mistakes that trip everyone up.

A and AAAA: name to address

An A record points a name at an IPv4 address. It's the most basic record there is, and it's what turns example.com into something like 93.184.216.34 so a browser knows where to connect.

An AAAA record does the identical job for IPv6, pointing at an address like 2606:2800:220:1:248:1893:25c8:1946. Same purpose, longer address format. A domain can have both, and modern devices will generally try the IPv6 one first.

If a site won't load and everything else looks right, a missing or wrong A record is the first thing to check. It's the record that says where the site lives.

CNAME: name to another name

A CNAME points one name at another name instead of at an address. You'd point www.example.com at example.com, or point a subdomain at a hosting provider's domain so that when they change servers, you don't have to touch anything. They update their address, your CNAME still points at their name, and it all just follows along.

There's one rule that catches people constantly: you can't put a CNAME on the root of your domain, the bare example.com with no subdomain. The DNS spec forbids it, because the root needs other records like MX living alongside it and a CNAME isn't allowed to share. Providers have workarounds with names like ALIAS or CNAME flattening, but plain CNAME on the root will either be rejected or quietly break your email.

MX: where mail goes

An MX record says which server receives email for your domain. It's got a priority number in front, and lower means higher priority, which is backwards from what most people guess. Mail tries the lowest number first and falls back to higher ones if that server's down.

Here's the thing worth knowing: MX records are completely separate from your website. Your site can live on one provider and your mail on another, and they don't know about each other. Plenty of "my email suddenly stopped" problems come from someone editing DNS for the website and wiping the MX records by accident.

TXT: notes machines read

A TXT record holds arbitrary text, and it's become the catch-all for verification and policy. Your SPF record is a TXT record. Your DMARC record is a TXT record. When a service asks you to "verify domain ownership" by adding a string to your DNS, that's a TXT record too.

They're harmless to have lots of, but two SPF records is a real mistake, because the spec allows exactly one and receivers treat two as an error. If you're adding email authentication, our SPF, DKIM and DMARC checker will show you what's actually published and flag that kind of clash.

NS and the rest

NS records name the servers that are authoritative for your domain, the ones that hold all the records above. They're usually set by your registrar or DNS host, and you rarely touch them unless you're moving your DNS somewhere new.

A few others you'll meet occasionally: PTR does the reverse of an A record, mapping an IP back to a name, and it matters for mail servers. SRV points at a service running on a specific port, used by things like VoIP. CAA says which certificate authorities are allowed to issue certificates for your domain. You won't touch these often, but it helps to recognise them.

The TTL on every record

Every record has a TTL, the number of seconds resolvers are allowed to cache it. It's why a change doesn't appear instantly. If you're planning to change a record, drop its TTL a day ahead so caches hold the old value for a shorter time, then make the change. You can watch it spread with our DNS propagation checker, which shows which resolvers have picked up the new value and which are still serving the old one.

Frequently Asked Questions

What's the difference between an A record and a CNAME?
An A record points at an IP address. A CNAME points at another name. Use an A record when you know the address, and a CNAME when you'd rather follow someone else's name so their changes carry through automatically.

Why can't I add a CNAME to my root domain?
The DNS spec doesn't allow it, because the root needs records like MX alongside it and a CNAME can't coexist with others. Look for your provider's ALIAS or flattening option instead.

My website works but email stopped. What happened?
Check your MX records. Website and mail are separate, and it's easy to wipe MX records while editing DNS for the site. That breaks incoming mail while the website carries on fine.

Can I have more than one A record?
Yes. Multiple A records for the same name is a simple way to spread traffic across servers, and resolvers hand them out in rotation. Multiple SPF records, though, is a mistake that breaks email.

How long do DNS changes take?
As long as the TTL that was cached before you made the change, not the one you just set. Anything from a few minutes to a day. Lower the TTL ahead of a planned change to shorten the wait.

« Back to Blog