DNS Record Types Reference
Every DNS record type worth knowing, with numeric codes, zone-file syntax examples and the rules that trip people up at the zone apex.
Result
Record types
| Type | Code | Purpose | Example |
|---|---|---|---|
| A | 1 | IPv4 address | example.com. 300 IN A 203.0.113.10 |
| AAAA | 28 | IPv6 address | example.com. 300 IN AAAA 2001:db8::10 |
| CNAME | 5 | Canonical name alias | www 300 IN CNAME example.com. |
| MX | 15 | Mail exchanger with priority | example.com. 300 IN MX 10 mail.example.com. |
| TXT | 16 | Arbitrary text - SPF, DKIM, verification | example.com. 300 IN TXT "v=spf1 -all" |
| NS | 2 | Delegated nameserver | example.com. 86400 IN NS ns1.example.com. |
| SOA | 6 | Zone authority and timers | example.com. IN SOA ns1 hostmaster 2026072401 7200 3600 1209600 300 |
| PTR | 12 | Reverse pointer | 10.113.0.203.in-addr.arpa. IN PTR host.example.com. |
| SRV | 33 | Service location with priority, weight, port | _sip._tcp 300 IN SRV 10 60 5060 sip.example.com. |
| CAA | 257 | Which CAs may issue certificates | example.com. IN CAA 0 issue "letsencrypt.org" |
| DS | 43 | Delegation signer - DNSSEC chain of trust | example.com. IN DS 12345 13 2 ABC... |
| DNSKEY | 48 | DNSSEC public key | example.com. IN DNSKEY 256 3 13 ... |
| RRSIG | 46 | DNSSEC signature over a record set | example.com. IN RRSIG A 13 2 300 ... |
| TLSA | 52 | Certificate association (DANE) | _443._tcp IN TLSA 3 1 1 ABC... |
| SVCB | 64 | Service binding parameters | example.com. IN SVCB 1 . alpn="h3,h2" |
| HTTPS | 65 | HTTPS service binding - carries ALPN and ECH | example.com. IN HTTPS 1 . alpn="h3" |
| ALIAS/ANAME | - | Provider-specific CNAME-like record for a zone apex | example.com. IN ALIAS target.cdn.net. |
| NAPTR | 35 | Regex-based rewriting, used in ENUM and SIP | example.com. IN NAPTR 100 10 "U" "E2U+sip" ... |
SOA fields
| SOA field | Meaning |
|---|---|
| Serial | Version number - secondaries transfer when it increases. Convention is YYYYMMDDnn. |
| Refresh | How often a secondary checks the serial (commonly 7200 s). |
| Retry | How soon to retry after a failed check (commonly 3600 s). |
| Expire | How long a secondary keeps serving without contact (commonly 1209600 s). |
| Minimum | Negative caching TTL - how long NXDOMAIN is cached (RFC 2308). |
About DNS Record Types Reference
A working reference for DNS record types: what each one carries, its numeric code, and the syntax that goes in a zone file - including the newer SVCB and HTTPS records that now drive HTTP/3 discovery.
Negative caching and the SOA minimum
The last SOA field controls how long resolvers cache an NXDOMAIN. Set it high and a newly created record stays invisible to anyone who queried the name too early; set it very low and every typo generates repeat traffic to your authoritative servers. Five minutes to fifteen minutes is a sensible range. The same field is often confused with the default record TTL, which it has not been since RFC 2308 — per-record TTLs govern positive answers.
TTL strategy
TTL is a trade between change agility and resilience. 3600 seconds is a sensible steady state; drop to 300 a full old-TTL period before a planned change, then raise it again afterwards. Very low TTLs make every resolver failure your outage, since nothing is cached to ride it out.
Common use cases
- Choosing the right record type for a service.
- Reading an unfamiliar record in a zone file.
- Understanding the SOA timers during a zone transfer problem.
Edge cases and gotchas
- MX records must point at a hostname, never at an IP address.
- Publishing a CAA record without listing every CA you use will block certificate issuance.