DNS Record Types Explained: A, AAAA, CNAME, MX, TXT, SRV, NS, CAA and More
DNS records are the individual entries in your zone, each with a type that tells resolvers what kind of answer it holds — an IP address, a mail server, a text policy, and so on. Knowing the common types and their rules is essential for managing any domain. You edit these in your DNS zone editor.
Address records
- A — maps a name to an IPv4 address. The workhorse record; see adding an A record.
- AAAA — maps a name to an IPv6 address. Same idea, for IPv6.
Aliases
- CNAME — points one name at another name (an alias). Powerful, but it cannot coexist with other records on the same name and cannot sit at the zone apex — see why a CNAME at the apex breaks and CNAME vs ALIAS vs ANAME.
- MX — names the mail servers for the domain, each with a priority. See MX records and mail routing.
Text-based records
- TXT — holds arbitrary text, used for domain verification and email authentication: SPF, DKIM and DMARC all live in TXT records.
Service and infrastructure
- SRV — advertises the host and port for a specific service (used by protocols like SIP and XMPP), with priority and weight.
- NS — delegates a zone to its authoritative nameservers. Present at the apex and used to delegate subdomains.
- SOA — the zone's administrative header; see the SOA record explained.
Security and reverse
- CAA — controls which certificate authorities may issue certificates for your domain; see CAA records.
- PTR — the reverse of an A record (IP to name), used for reverse DNS.
Frequently asked questions
What's the difference between an A record and a CNAME?
An A record points a name directly to an IP; a CNAME points a name to another name. Use an A record for the real destination and CNAMEs for aliases — but never a CNAME at the domain apex.
Can one name have multiple records?
Yes for most types — several A records for load spreading, multiple MX for mail — but a CNAME must be the only record on its name. Mixing a CNAME with anything else is invalid.
Which record type do I use for email authentication?
TXT. SPF, DKIM and DMARC are all published as TXT records at specific names. See the SPF, DKIM and DMARC guide for the exact placement of each.
Was this article helpful?