Guide · Jul 7, 2026

A Record vs CNAME vs TXT: DNS Records Explained

DNS is one of those systems everyone relies on constantly and almost nobody looks at directly until something breaks — a domain won't point where it should, email silently stops arriving, or a hosting provider's setup instructions casually mention "add a TXT record" with no explanation of what that actually means. The record types themselves are simple once you see what each one is actually for; the confusion is usually just never having had a reason to learn the vocabulary.

A and AAAA: where a domain actually points

An A record maps a domain directly to an IPv4 address, like 192.0.2.1 — this is the most fundamental record type, since it's what ultimately tells a browser which server to connect to. AAAA does the identical job for IPv6 addresses (something like 2001:db8::1). A domain can have an A record, an AAAA record, both, or in older setups, just the A record — if AAAA comes back empty on a lookup, that simply means the domain isn't configured for IPv6 yet, which is still common and not inherently a problem.

CNAME: an alias, not an address

A CNAME record doesn't point to an IP address at all — it points to another domain name, and tells DNS "to resolve this, go look up that domain instead." This is how www.example.com is commonly set up to follow whatever example.com resolves to, without needing to be kept in sync manually if the underlying IP ever changes. The catch that trips people up: a domain's root (the "apex," like example.com with nothing in front of it) technically can't have a CNAME record per the DNS spec, only subdomains can — which is why apex domain setups sometimes need a different, provider-specific workaround (often called an ALIAS or ANAME record, which behaves like a CNAME but is technically implemented as something else under the hood).

MX: where email for the domain actually goes

MX records point to the mail servers responsible for handling email sent to that domain, each with a priority number — lower numbers are tried first, with the others as fallback. A domain with no MX record isn't necessarily broken; it may simply not be set up to receive email at all, which is normal for plenty of subdomains used purely for hosting assets or a web app. Misconfigured MX records are a classic "email quietly stops arriving with no error message" bug, because the sending server just tries the next mail exchange or gives up — nothing on the sender's end announces that your domain's setup is wrong.

TXT: the general-purpose catch-all

TXT records hold arbitrary text, and unlike the other types, they don't have one specific job — they're used for domain ownership verification (Google Search Console and similar tools ask you to add one to prove you control a domain), SPF and DKIM email authentication records (which help receiving mail servers verify a message actually came from who it claims to), and various other one-off verification schemes that different services invent. A single domain often has several unrelated TXT records at once, each serving a completely different purpose, which is why it's common to see a handful of them stacked up on any domain that's been through a few service integrations.

NS: who's actually authoritative

NS records specify which nameservers are authoritative for a domain — in other words, which servers hold the real, current answer for all of that domain's other records. This is set at the domain registrar level, and it's usually the first thing that has to propagate correctly whenever a domain moves to a new host or DNS provider; get this wrong, and none of the domain's other records matter, because nothing is asking the right server for them in the first place.

Why "it hasn't updated yet" is usually true, not an excuse

DNS records are cached at multiple layers — your own device, your router, your ISP's resolver, public resolvers like Google's or Cloudflare's — each for a duration set by that record's TTL (time to live). A change made at the registrar or DNS provider isn't instantly visible everywhere; every cache holding the old value needs to expire first, which is exactly why the same lookup can return different, seemingly contradictory results depending on where and when it's run.

Check it yourself

FreeToolDev's IP / DNS / SSL Bulk Lookup tool checks A, AAAA, MX, TXT, and NS records for a whole list of domains at once, and shows your own current public IP address instantly at the top of the page — no code, no separate "what's my IP" search needed.