Reference
DNS Record Types Explained
DNS record types are the individual statements that make a zone useful. Different record types answer different questions: where a host lives, where email goes, who is authoritative, or which policy controls apply.
Why record types matter
When someone says “check the DNS,” they usually mean “check the relevant record type.” A browser typically cares about A, AAAA, and sometimes CNAME chains. Email relies on MX, TXT, and often CNAMEs or vendor-specific hostnames. Delegation relies on NS and glue at the parent level. Because the same name can hold multiple record types, understanding the query type is the first step in troubleshooting.
The official record format definitions originated in RFC 1035, with many newer types and clarifications standardized later.
The records you will encounter most often
| Type | Purpose | Common use |
|---|---|---|
| A | Maps a name to an IPv4 address | Web front ends, APIs, legacy services |
| AAAA | Maps a name to an IPv6 address | IPv6-enabled sites and services |
| CNAME | Aliases one hostname to another hostname | CDN hostnames, vendor-managed endpoints |
| MX | Declares mail exchangers for a domain | Email delivery routing |
| TXT | Publishes arbitrary text data | SPF, verification tokens, DMARC, DKIM |
| NS | Identifies authoritative name servers | Zone delegation |
| SOA | Declares zone authority metadata | Primary server info, serial, timers |
| PTR | Maps an IP address back to a name | Reverse DNS, mail reputation checks |
| SRV | Describes service location by host and port | VoIP, directory services, older service discovery patterns |
A, AAAA, and CNAME: the web-facing trio
A and AAAA records are the most direct answers in DNS. They tell clients which IPv4 or IPv6 address to contact. If your site is dual-stack, you often publish both. CNAME is different: it does not point directly to an IP address. Instead, it says one hostname is an alias of another. Resolvers then continue the lookup until they reach address records.
CNAMEs are common when a SaaS or CDN wants to control the final destination. The tradeoff is that CNAMEs can add lookup steps and have placement rules. Most notably, a hostname that is a CNAME cannot also hold other record types at that same owner name. That is why apex-domain aliasing often requires provider-specific flattening or ANAME/ALIAS behavior rather than a literal standards-based CNAME at the zone apex.
dig example.com A
dig www.example.com AAAA
dig app.example.com CNAME
MX, TXT, and mail-related policy
MX records tell senders which hosts accept mail for a domain, and the numeric preference values help order delivery attempts. The target of an MX record should resolve to address records, not another MX record. TXT records then carry much of the policy information surrounding email, including SPF declarations and verification tokens.
DMARC is also typically published as TXT at _dmarc.example.com. DKIM often appears as TXT beneath a selector such as selector1._domainkey.example.com. In other words, mail uses multiple names and record types together. A domain can have working MX records while still failing DMARC alignment or DKIM verification.
Do not evaluate email health from the apex record set alone. Mail-related records often live on derived names such as _dmarc and _domainkey.
NS, SOA, PTR, and SRV: infrastructure records
NS records tell the world which name servers are authoritative for a zone. At delegation boundaries, parent zones publish NS records that point to the child’s authoritative servers. SOA records carry zone metadata such as the primary authoritative server name, contact mailbox encoding, serial number, refresh intervals, retry intervals, and negative caching values.
PTR records operate in reverse DNS zones under in-addr.arpa and ip6.arpa. They are especially important for mail servers because many receivers consider reverse DNS during trust evaluation. SRV records, while less visible to web teams, still matter for protocols that need both a host and port with priority and weight information.
FAQ
Can one hostname have both A and AAAA records?
Yes. That is common for dual-stack services that support both IPv4 and IPv6.
Can a hostname be both a CNAME and have other records?
No. Under standard DNS rules, a CNAME owner name cannot also hold other record types.
Which records should I check first if mail is failing?
Start with MX, then confirm the targets resolve, then inspect SPF, DKIM, and DMARC TXT records.