Records Are Typed Answers
A DNS zone stores resource records, each with a name, a type, a time to live, and data. The type decides what kind of question the record answers, so one name can hold several record types at once.
Address and Alias Records
- An A record maps a name to an IPv4 address.
- An AAAA record maps a name to an IPv6 address.
- A CNAME record makes a name an alias for another name, so lookups continue at the target.
Mail and Service Records
- An MX record names the mail servers for a domain and a preference number that orders them.
- An SRV record advertises the host and port for a named service.
- A TXT record holds free text, often used for domain verification and mail policy.
Zone and Name Server Records
- An NS record lists the authoritative name servers for a zone.
- An SOA record holds the zone serial and refresh timers and marks the start of authority.
A CNAME cannot sit at the same name as other records, which is why a zone apex usually uses an A or AAAA record directly.
Key idea
Each DNS record has a type that fixes its meaning, so A and AAAA give addresses, CNAME gives an alias, MX gives mail servers, and NS and SOA describe the zone itself.