Why There Are Multiple Record Types
DNS is often described as the internet's phone book — it turns domain names into IP addresses. But that description undersells how much work DNS actually does. A single domain might need to receive email, prove ownership to Google, host multiple subdomains on different servers, and support both IPv4 and IPv6 clients simultaneously. One record type cannot do all of this. So DNS was designed with a flexible type system, where each record type carries a specific kind of data for a specific purpose.
Every DNS record has the same basic structure: a name, a type, a class (almost always IN for Internet), a TTL (time-to-live cache duration), and the record data. The type field determines what the data field contains and how it should be interpreted. Understanding the common types gives you the knowledge to read and configure DNS for any domain.
DNS Record Types: The Complete Reference
| Record | Full Name | Stores | Common Use |
|---|---|---|---|
A | Address | IPv4 address (32-bit) | Maps a hostname to an IPv4 address |
AAAA | IPv6 Address | IPv6 address (128-bit) | Maps a hostname to an IPv6 address |
CNAME | Canonical Name | Another hostname | Alias one name to another (e.g., www to root domain) |
MX | Mail Exchanger | Priority + mail server hostname | Routes incoming email to the correct mail server |
NS | Name Server | Authoritative nameserver hostname | Delegates a zone to a set of nameservers |
TXT | Text | Arbitrary text string | Domain verification, SPF, DKIM, DMARC policies |
SOA | Start of Authority | Zone metadata | Defines primary nameserver, admin email, serial number, refresh intervals |
PTR | Pointer | Hostname | Reverse DNS — maps an IP address back to a hostname |
SRV | Service | Priority, weight, port, hostname | Locates services (e.g., SIP, XMPP, Minecraft servers) |
CAA | Certification Authority Authorization | CA name and policy tag | Restricts which certificate authorities may issue TLS certs for the domain |
A vs AAAA: IPv4 vs IPv6
The A record is the most fundamental record in DNS. It contains a 32-bit IPv4 address in dotted-decimal notation, such as 93.184.216.34. When a browser resolves example.com, the final answer it needs is an A (or AAAA) record — everything else in DNS is a stepping stone to get there.
The AAAA record (pronounced "quad-A") does the same job for IPv6. It stores a 128-bit IPv6 address in colon-hex notation, such as 2606:2800:220:1:248:1893:25c8:1946. When a client supports IPv6, its resolver will query for AAAA records first. Most modern operating systems implement the Happy Eyeballs algorithm (RFC 8305), which races IPv4 and IPv6 connection attempts in parallel and uses whichever responds first.
You can publish both an A and an AAAA record for the same hostname. Dual-stack clients will get both answers and choose the appropriate one. Publishing only AAAA records while dropping A records will break connectivity for any client or network that does not yet support IPv6 — so dual-stack publishing is the safe approach during the ongoing IPv4-to-IPv6 transition.
CNAME vs A Record: When to Use Each
A CNAME record maps one name to another name, rather than directly to an IP address. For example, www.example.com CNAME example.com means "to resolve www.example.com, first resolve example.com and use whatever address you find there." This is useful for aliasing — when you want multiple names to always point to the same server without maintaining multiple A records that you'd have to update in sync.
However, CNAME records come with important restrictions. A CNAME cannot coexist with any other record type at the same name — this is why you cannot put a CNAME at the zone apex (the root domain itself, e.g., example.com), because the apex must have NS and SOA records. Many DNS providers work around this with proprietary CNAME-flattening or ALIAS records that behave like CNAMEs at the apex but resolve to an IP address at query time.
Use A records when you know the server's IP and control it directly. Use CNAME when you're pointing to a third-party service (a CDN, a hosting platform, a load balancer) whose IP addresses change over time and that service manages the A records for you.
TXT Records: More Than Domain Verification
TXT records were originally designed to hold human-readable notes about a domain. Today they carry critical machine-readable policy data. The most important TXT record use cases are:
Domain ownership verification: Google Search Console, Microsoft 365, and other services ask you to add a TXT record with a specific token to prove you control the domain. The service queries the record and confirms you could only add it if you had DNS access.
SPF (Sender Policy Framework): An SPF TXT record at your domain apex lists the IP addresses and mail servers authorized to send email on behalf of your domain. Receiving mail servers check SPF before accepting email claiming to be from your domain. A typical SPF record looks like: v=spf1 include:_spf.google.com ~all.
DKIM (DomainKeys Identified Mail): DKIM public keys are published as TXT records under a selector subdomain like google._domainkey.example.com. Mail servers use these keys to verify that email was signed by the domain's private key — confirming the message was not tampered with in transit.
DMARC: A DMARC TXT record at _dmarc.example.com tells receiving servers what to do when SPF or DKIM checks fail — quarantine, reject, or do nothing — and where to send aggregate reports.
Frequently Asked Questions
What is the most common DNS record type?
The A record is the most common DNS record type. It maps a domain name to an IPv4 address and is required for almost every domain that serves web traffic. Nearly every DNS query chain ends with an A or AAAA record lookup.
Can I have multiple A records for one domain?
Yes. You can publish multiple A records for the same domain, each pointing to a different IP address. This is called round-robin DNS and is used as a simple form of load balancing — resolvers cycle through the addresses, distributing traffic across multiple servers.
What is a CNAME chain?
A CNAME chain occurs when a CNAME record points to another name that is also a CNAME, which points to yet another name before finally reaching an A or AAAA record. Chains add latency because each step requires an additional DNS lookup. Most resolvers follow chains up to a maximum depth (commonly 8–10 hops) to prevent infinite loops.
What do MX records control?
MX (Mail Exchanger) records tell other mail servers where to deliver email for your domain. Each MX record contains a priority number and a hostname. When someone sends email to user@yourdomain.com, the sending server looks up your MX records and connects to the highest-priority mail server listed.
What is a PTR record?
A PTR (Pointer) record is the reverse of an A record — it maps an IP address back to a hostname. PTR records live in the special in-addr.arpa zone and are used for reverse DNS lookups. They are commonly used by mail servers to verify that a sending IP matches the hostname it claims to be.
What does TTL mean in a DNS record?
TTL stands for Time To Live. In a DNS record, TTL is a number (in seconds) that tells resolvers how long to cache the record before checking for an updated value. A TTL of 3600 means resolvers cache the record for one hour. Lower TTL values mean changes propagate faster but increase query load on your nameservers.