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.

Reference Protocol Reference Runs in your browser

Result

Record types

TypeCodePurposeExample
A1IPv4 addressexample.com. 300 IN A 203.0.113.10
AAAA28IPv6 addressexample.com. 300 IN AAAA 2001:db8::10
CNAME5Canonical name aliaswww 300 IN CNAME example.com.
MX15Mail exchanger with priorityexample.com. 300 IN MX 10 mail.example.com.
TXT16Arbitrary text - SPF, DKIM, verificationexample.com. 300 IN TXT "v=spf1 -all"
NS2Delegated nameserverexample.com. 86400 IN NS ns1.example.com.
SOA6Zone authority and timersexample.com. IN SOA ns1 hostmaster 2026072401 7200 3600 1209600 300
PTR12Reverse pointer10.113.0.203.in-addr.arpa. IN PTR host.example.com.
SRV33Service location with priority, weight, port_sip._tcp 300 IN SRV 10 60 5060 sip.example.com.
CAA257Which CAs may issue certificatesexample.com. IN CAA 0 issue "letsencrypt.org"
DS43Delegation signer - DNSSEC chain of trustexample.com. IN DS 12345 13 2 ABC...
DNSKEY48DNSSEC public keyexample.com. IN DNSKEY 256 3 13 ...
RRSIG46DNSSEC signature over a record setexample.com. IN RRSIG A 13 2 300 ...
TLSA52Certificate association (DANE)_443._tcp IN TLSA 3 1 1 ABC...
SVCB64Service binding parametersexample.com. IN SVCB 1 . alpn="h3,h2"
HTTPS65HTTPS service binding - carries ALPN and ECHexample.com. IN HTTPS 1 . alpn="h3"
ALIAS/ANAME-Provider-specific CNAME-like record for a zone apexexample.com. IN ALIAS target.cdn.net.
NAPTR35Regex-based rewriting, used in ENUM and SIPexample.com. IN NAPTR 100 10 "U" "E2U+sip" ...

SOA fields

SOA fieldMeaning
SerialVersion number - secondaries transfer when it increases. Convention is YYYYMMDDnn.
RefreshHow often a secondary checks the serial (commonly 7200 s).
RetryHow soon to retry after a failed check (commonly 3600 s).
ExpireHow long a secondary keeps serving without contact (commonly 1209600 s).
MinimumNegative caching TTL - how long NXDOMAIN is cached (RFC 2308).
The CNAME-at-apex rule
A CNAME cannot coexist with any other record at the same name, which rules it out at the zone apex - the apex must carry SOA and NS. Use ALIAS/ANAME (provider-specific) or point the apex at an address directly.

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.

Frequently asked questions

How many nameservers should a zone have?
At least two, on different networks and ideally different providers. Registries require a minimum of two, and a single point of failure in DNS takes down every service that depends on the name.
Why can I not put a CNAME on my root domain?
The apex already has SOA and NS records, and a CNAME must be the only record at its name. ALIAS or ANAME records are provider implementations that resolve this server-side.