AAddressingIPv4 address
www 300 IN A 192.0.2.80Maps a name to an IPv4 address. Multiple A records are one RRset; ordering alone is not a robust load-balancing guarantee.
Resource records
A record is identified by owner name, class and type. Records with the same owner, class and type form an RRset and should be treated as one signed and cached unit.
AAddressingwww 300 IN A 192.0.2.80Maps a name to an IPv4 address. Multiple A records are one RRset; ordering alone is not a robust load-balancing guarantee.
AAAAAddressingwww 300 IN AAAA 2001:db8::80Maps a name to an IPv6 address. IPv4 and IPv6 are independent RRsets and can have different answers and TTLs.
CNAMEAddressingdocs 300 IN CNAME www.example.com.Makes one owner name an alias for another. A CNAME owner cannot normally hold other data, and a conventional CNAME cannot exist at a zone apex that also needs SOA and NS records.
NSAuthority@ 3600 IN NS ns1.example.net.Identifies servers authoritative for a zone or delegated child. Parent and child copies serve different protocol roles.
SOAAuthority@ IN SOA ns1.example.net. hostmaster.example.com. (
2026080301 3600 900 1209600 300 )Contains the primary server name, responsible mailbox, serial, refresh, retry, expire and negative-caching parameters.
DSSecurityexample.com. IN DS 12345 13 2 <digest>Lives in the parent zone and identifies a child DNSKEY. It is the link that makes the child part of the DNSSEC chain of trust.
MXServices@ 3600 IN MX 10 mail.example.com.Routes mail to a host name, not directly to an IP address. Lower preference values are tried first. The target must resolve through address records.
SRVServices_xmpp._tcp IN SRV 10 5 5222 xmpp.example.com.Publishes priority, weight, port and target for protocols that define SRV discovery.
HTTPS / SVCBServices@ 300 IN HTTPS 1 . alpn="h2,h3" ipv4hint=192.0.2.80Advertises alternative service endpoints and parameters. HTTPS records can accelerate connection setup and signal capabilities such as HTTP/3.
TXTServices@ 300 IN TXT "v=spf1 -all"A generic text container now used by many application protocols. One logical value can be split across quoted character strings.
CAASecurity@ 3600 IN CAA 0 issue "letsencrypt.org"States which certificate authorities may issue for a name. It constrains issuance policy but does not replace certificate validation.
TLSASecurity_25._tcp.mail IN TLSA 3 1 1 <sha256>Associates a TLS service with a certificate or public key. Meaningful security depends on DNSSEC validation.
DNSKEY / RRSIGSecurity@ IN DNSKEY 257 3 13 <public-key>
www IN RRSIG A 13 3 300 ...DNSKEY publishes verification keys; RRSIG covers an RRset with a time-bounded digital signature.
NSEC / NSEC3Securityhost IN NSEC next.example.com. A AAAA RRSIG NSECProves that a name or type does not exist. NSEC3 hashes owner names but does not make zone contents secret.
Zone-file syntax
@ represents the current origin. An owner name omitted at the start of a record repeats the previous owner. A trailing dot makes a domain name absolute; without it, the origin is appended.
Parentheses continue a record across lines. Semicolons begin comments. TTL and class may be inherited, but explicit values often make maintenance safer.
$ORIGIN example.com.
$TTL 3600
@ IN SOA ns1.example.net. hostmaster.example.com. (
2026080301 ; serial
3600 ; refresh
900 ; retry
1209600 ; expire
300 ; negative TTL
)
@ IN NS ns1.example.net.
@ IN NS ns2.example.net.
@ IN MX 10 mail.example.com.
www IN A 192.0.2.80
www IN AAAA 2001:db8::80
mail IN A 192.0.2.25Common mistakes
MX points to a domain name. Publish A and/or AAAA records for that target.
A CNAME owner is an alias and generally cannot also carry MX, TXT, A or other records.
ns1.example.net inside the example.com. zone becomes ns1.example.net.example.com. unless written as an absolute name.
Long TXT RDATA may be stored as multiple character strings that applications concatenate.
Secondaries use the SOA serial to determine whether a newer version exists.