DNS Record Types Explained: A, MX, TXT, CNAME, NS & More
DNS has dozens of record types defined in various RFCs, but in practice, day-to-day domain administration revolves around a handful of them. Here’s what each one does.
A record
Maps a domain name to an IPv4 address. This is the most common record type — it’s what makes yourdomain.com resolve to a server.
yourdomain.com. A 203.0.113.10
AAAA record
The IPv6 equivalent of an A record. Maps a domain to an IPv6 address.
yourdomain.com. AAAA 2001:db8::1
MX record
Specifies which mail servers accept email for the domain, along with a priority value (lower = preferred). See the full MX record guide for details.
yourdomain.com. MX 10 mail.yourdomain.com.
TXT record
Holds arbitrary text data. Originally meant for human-readable notes, TXT records are now the backbone of email authentication (SPF, DKIM, DMARC) and domain ownership verification for services like Google Search Console.
yourdomain.com. TXT "v=spf1 include:_spf.google.com -all"
See the TXT record lookup guide for more on reading these.
CNAME record
An alias — points one domain name to another domain name, which is then resolved through its own records.
www.yourdomain.com. CNAME yourdomain.com.
Important constraint: a name with a CNAME record cannot have any other record types (no A, no MX, nothing else) at that same name. This is why CNAME records are almost never used on a bare root domain (yourdomain.com), only on subdomains like www or blog.
NS record
Specifies the authoritative name servers for a domain — the servers that hold the actual DNS records and answer queries about them.
yourdomain.com. NS ns1.dnsprovider.com.
yourdomain.com. NS ns2.dnsprovider.com.
These are usually set automatically by your registrar or DNS host when you point a domain at their nameservers.
A quick comparison table
| Type | Points to | Common use |
|---|---|---|
| A | IPv4 address | Website hosting, server IPs |
| AAAA | IPv6 address | IPv6 hosting |
| MX | Mail server hostname | Email delivery |
| TXT | Arbitrary text | SPF, DKIM, DMARC, verification |
| CNAME | Another domain name | Subdomain aliasing |
| NS | Name server hostname | Delegating DNS authority |
Other record types you might encounter
- SOA (Start of Authority) — metadata about the DNS zone itself (primary nameserver, admin contact, refresh timers).
- SRV — specifies a host and port for a specific service, commonly used by VoIP and some messaging protocols.
- PTR — the reverse of an A record; maps an IP address back to a hostname, used in reverse DNS lookups.
- CAA — restricts which certificate authorities are allowed to issue SSL/TLS certificates for the domain.
Checking any of these yourself
Use the free DNS Lookup tool to query A, AAAA, MX, TXT, CNAME, or NS records for any domain directly from your browser.
If you’re setting up DNS for a domain you plan to send email from, get MX, SPF, DKIM, and DMARC all correctly configured before sending volume — check them with the SPF/DKIM/DMARC checker, then consider a gradual warm-up. MailPilot helps warm up new mailboxes and monitor deliverability for cold email and outreach.