DNS Reference

Quick reference for DNS record types — A, AAAA, CNAME, MX, TXT, NS, SOA, SRV, PTR, CAA — with format and TTL guidance.

AAddress Record

Maps a hostname to an IPv4 address.

Format
<hostname> <ttl> IN A <ipv4-address>
Example
example.com. 300 IN A 93.184.216.34
TTL Guidance

300–3600s for most records; lower for frequently changing IPs.

AAAAIPv6 Address Record

Maps a hostname to an IPv6 address.

Format
<hostname> <ttl> IN AAAA <ipv6-address>
Example
example.com. 300 IN AAAA 2606:2800:220:1:248:1893:25c8:1946
TTL Guidance

300–3600s, same as A records.

CNAMECanonical Name Record

Aliases one name to another (the canonical name).

Format
<alias> <ttl> IN CNAME <canonical-name>
Example
www.example.com. 300 IN CNAME example.com.
TTL Guidance

300–3600s; shorter TTL improves failover speed.

MXMail Exchange Record

Specifies mail servers responsible for receiving email for the domain.

Format
<domain> <ttl> IN MX <priority> <mail-server>
Example
example.com. 3600 IN MX 10 mail.example.com.
TTL Guidance

3600s or higher; mail servers change rarely.

TXTText Record

Stores arbitrary text data; used for SPF, DKIM, DMARC, and domain verification.

Format
<domain> <ttl> IN TXT "<text-string>"
Example
example.com. 3600 IN TXT "v=spf1 include:_spf.google.com ~all"
TTL Guidance

3600s for SPF/DKIM; shorter for frequently updated verification tokens.

NSName Server Record

Delegates a DNS zone to use the given authoritative name servers.

Format
<domain> <ttl> IN NS <nameserver>
Example
example.com. 86400 IN NS ns1.example.com.
TTL Guidance

86400s (24h) or higher; name servers change infrequently.

SOAStart of Authority Record

Provides authoritative information about a DNS zone including primary name server and contact email.

Format
<domain> <ttl> IN SOA <primary-ns> <admin-email> <serial> <refresh> <retry> <expire> <minimum>
Example
example.com. 86400 IN SOA ns1.example.com. admin.example.com. 2024010101 3600 900 604800 300
TTL Guidance

86400s; changes only when zone configuration changes.

SRVService Record

Specifies the location (hostname and port) of servers for specific services.

Format
_<service>._<proto>.<domain> <ttl> IN SRV <priority> <weight> <port> <target>
Example
_sip._tcp.example.com. 3600 IN SRV 10 20 5060 sipserver.example.com.
TTL Guidance

3600s; adjust lower if service endpoints change frequently.

PTRPointer Record

Maps an IP address to a hostname (reverse DNS lookup).

Format
<reversed-ip>.in-addr.arpa. <ttl> IN PTR <hostname>
Example
34.216.184.93.in-addr.arpa. 300 IN PTR example.com.
TTL Guidance

300–3600s; set by the IP address owner (usually hosting provider).

CAACertification Authority Authorization Record

Specifies which certificate authorities (CAs) are allowed to issue SSL/TLS certificates for the domain.

Format
<domain> <ttl> IN CAA <flags> <tag> "<value>"
Example
example.com. 3600 IN CAA 0 issue "letsencrypt.org"
TTL Guidance

3600–86400s; changes only when switching certificate authorities.