DNS Records
The common DNS record types, such as A, MX, TXT, NS, etc., with each TYPE value and its purpose.
Every DNS record carries a TYPE, a number IANA assigns. Software never sees MX on the wire. It sees 15, so the mnemonic-to-number mapping is the contract between a DNS message and its parser.
Examples use the RFC 5737 and 3849 documentation ranges, never live addresses.
Before you read the table
- MX preference is lower-is-preferred.
- TXT is where SPF, DKIM keys and DMARC policy live, and also where DNS tunnels hide data.
10 rows.
| Type | Value | Purpose |
|---|---|---|
| A | 1 | Maps a hostname to a 32-bit IPv4 address: the fundamental record type behind ordinary IPv4 name resolution. |
| AAAA | 28 | Maps a hostname to a 128-bit IPv6 address: the IPv6 counterpart to the A record, needed because A's RDATA only has room for 32 bits. |
| CNAME | 5 | Points one name to another canonical name, so every other record for the alias is looked up through the target instead of being duplicated. |
| MX | 15 | Identifies a mail server for the domain along with a preference value used to rank it against any other mail servers for the same domain: lower values are preferred. |
| TXT | 16 | Holds arbitrary text data attached to a name. The RFC leaves the meaning of that text up to whatever's using it, and in practice that's grown to include domain-ownership verification and email-authentication policies such as SPF. |
| NS | 2 | Delegates a zone (or subdomain) to a specific set of authoritative name servers. |
| SOA | 6 | Marks the start of a zone of authority (one SOA record per zone), and carries its primary name server, admin mailbox, serial number, and the refresh/retry/expire timers secondary servers use to stay in sync. |
| PTR | 12 | Maps an address back to a hostname (the reverse of an A/AAAA lookup) conventionally served from the in-addr.arpa (IPv4) or ip6.arpa (IPv6) reverse-lookup zones. |
| SRV | 33 | Publishes the hostname, port, and relative priority/weight for a specific service, addressed via an underscore-prefixed "_service._proto.name" label instead of a plain hostname. |
| CAA | 257 | Restricts which certificate authorities are allowed to issue TLS certificates for the domain, and can name where a CA should report policy violations. |