Networking 7 min read
DNS record types, plainly explained: A, AAAA, CNAME, MX, TXT and more
DNS is a distributed database that maps names to data. Most day-to-day DNS problems come from a record pointing somewhere unexpected, a missing record, or two records that contradict each other. Knowing the common types makes those problems visible.
A lookup tool shows the records and their TTLs. TTL is how long resolvers may cache an answer, so it also explains why a change can appear to work for one person and not another.
Address records: A and AAAA
An A record returns an IPv4 address. An AAAA record returns an IPv6 address. A name can have multiple records of each type, and resolvers may return them in a different order or use only one, depending on the client.
If a site works over IPv4 but not IPv6, an incorrect AAAA record is a common cause. Removing it is sometimes safer than publishing a half-configured IPv6 address.
Aliases: CNAME
A CNAME says “this name is another name”. It is useful for pointing www.example.com at a hostname managed by a platform. The target must itself resolve to address records.
A CNAME cannot sit alongside an A, MX or TXT record at the same name. At the zone apex, providers often offer a proprietary ALIAS or flattened CNAME because the DNS standard does not allow a normal CNAME there.
Mail: MX and TXT
MX records name the mail servers for a domain and carry a preference value; lower values are preferred. Changing MX without updating SPF and DKIM records is a classic way to break deliverability.
TXT records are free-form strings used by SPF, DKIM, DMARC and domain verification. Multiple TXT records at one name are normal. Long values may be split into quoted chunks, and the client concatenates them.
Service and delegation records
SRV records locate services by protocol and port. CAA records restrict which certificate authorities may issue certificates for a domain. NS records delegate a zone to specific nameservers, and changing them moves authority for every record below.
When debugging, query the record type you expect and then query the parent delegation. If the authoritative servers do not have the record, caching is not your problem.