DNS Records Reference

The record types you are likely to touch, with zone-file examples and the rules that catch people out.

By BoltQuickTools team · Updated November 8, 2026

A DNS zone file line reads: name, TTL in seconds, class (nearly always IN), type, data. A name ending in a dot is fully qualified. Without the dot, most zone files append the zone name, so mail.example.com can silently become mail.example.com.example.com.. The examples below use addresses reserved for documentation (192.0.2.0/24 and 2001:db8::/32).

A

Maps a name to an IPv4 address. A name can have several A records, and clients pick among them.

example.com.    300    IN  A     192.0.2.10

TTL is how long resolvers may cache the answer. Nothing is pushed out when you edit a record; resolvers simply refetch after their cached copy expires. To make a cutover quick, lower the TTL at least one old-TTL period before the change, then raise it afterwards.

AAAA

Maps a name to an IPv6 address. The four A's reflect that an IPv6 address is four times the size of an IPv4 address (128 bits against 32).

example.com.    300    IN  AAAA  2001:db8::10

If you publish AAAA, make sure the service really answers over IPv6. Clients with IPv6 usually prefer it, so a broken AAAA can look like an intermittent outage.

CNAME

Makes one name an alias of another. The resolver then looks up the target.

www.example.com.    3600   IN  CNAME  example.com.

Rules: a name with a CNAME cannot hold other data records. The zone apex always has SOA and NS records, so a standard CNAME is not allowed there. Some DNS providers offer non-standard ALIAS, ANAME or "CNAME flattening" features that resolve the target themselves and publish the resulting addresses at the apex.

MX and NS records must point at names with address records, not at CNAMEs.

MX

Tells sending mail servers where to deliver mail for the domain.

example.com.    3600   IN  MX  10  mail.example.com.
example.com.    3600   IN  MX  20  backup.example.com.

The number is the preference, and lower is tried first. Equal numbers share the load. A higher-numbered host normally receives mail only if the lower ones cannot be reached.

The target must be a hostname, not an IP address. With no MX at all, senders fall back to the domain's A or AAAA address. To state that a domain receives no mail, publish a null MX (RFC 7505): example.com. IN MX 0 .

TXT

Free-form text, used mostly for email authentication and proving domain ownership.

example.com.                      3600 IN TXT "v=spf1 include:_spf.google.com -all"
selector1._domainkey.example.com. 3600 IN TXT "v=DKIM1; k=rsa; p=MIIBIjANBg..."
_dmarc.example.com.               3600 IN TXT "v=DMARC1; p=quarantine; rua=mailto:[email protected]"

NS

Names the authoritative servers for a zone.

example.com.    86400  IN  NS  ns1.provider.example.
example.com.    86400  IN  NS  ns2.provider.example.

To switch DNS providers, copy every record to the new provider first, then change the nameservers at your registrar, which updates the parent zone. Resolvers can keep using cached delegation data until it expires, so leave the old zone running for a couple of days.

If a nameserver sits inside the zone it serves (ns1.example.com for example.com), the parent needs glue records giving its address, or nobody could find it.

SOA

Start of Authority. Exactly one per zone, holding zone-wide settings.

example.com.  86400  IN  SOA  ns1.example.com. admin.example.com. (
    2026110801   ; serial
    7200         ; refresh
    3600         ; retry
    1209600      ; expire
    300 )        ; negative-caching TTL

The second name is the admin email with the first dot standing in for @, here [email protected]. Secondary servers compare the serial to decide whether to transfer the zone, so it must increase on every change. Managed DNS services usually do this for you.

The last field tells resolvers how long to cache "this name does not exist" (RFC 2308). If you query a new name before creating it, that negative answer can linger for this long.

CAA

Lists which certificate authorities may issue certificates for the domain. CAs must check it before issuing.

example.com.    3600   IN  CAA  0 issue "letsencrypt.org"
example.com.    3600   IN  CAA  0 issuewild ";"
example.com.    3600   IN  CAA  0 iodef "mailto:[email protected]"

issue allows a CA. issuewild applies to wildcard certificates and, when present, overrides issue for them; the value ";" means no CA may issue. iodef is where a CA can report refused requests. CAs search up the tree, so a CAA record at example.com also covers www.example.com unless that name has its own. When a certificate request fails unexpectedly, check here.

DS and DNSKEY

The DNSSEC chain of trust. DNSKEY holds your zone's public keys. DS (Delegation Signer) is a digest of one of those keys, stored in the parent zone.

example.com.    3600   IN  DS  2371 13 2 E0E2BC25...

Fields: key tag (2371), algorithm (13 = ECDSA P-256 with SHA-256), digest type (2 = SHA-256), digest. After enabling DNSSEC at your DNS provider, publish the DS at your registrar so the chain validates.

When changing DNS providers: a stale DS makes validating resolvers treat your domain as bogus and return SERVFAIL. Remove the DS and wait for it to expire before moving, unless both providers support a signed migration.

SRV

Locates a service by name, giving both host and port. SIP, XMPP, Minecraft and Active Directory all use it.

_sip._tcp.example.com.    3600   IN  SRV  10 60 5060 sipserver.example.com.

Format: priority weight port target. Lowest priority is tried first; weight spreads load among records of equal priority. The target must be a hostname with an address record, not a CNAME.

PTR

Reverse lookup: IP address to hostname. Lives under in-addr.arpa for IPv4 with the octets reversed, and ip6.arpa for IPv6 with each hex digit reversed.

10.2.0.192.in-addr.arpa.  3600  IN  PTR  mail.example.com.

The record belongs to whoever controls the IP range, so you normally set it through your hosting or network provider, not in your domain's zone.

Receiving mail servers commonly check that the sending IP has a PTR and that the name resolves back to the same IP. Missing or mismatched reverse DNS is a frequent cause of rejected mail.

HTTPS and SVCB

RFC 9460 records that tell a client how to connect before it connects: supported protocols such as HTTP/3, address hints, and alternative endpoints. Unlike CNAME, the HTTPS type can be used at the apex.

example.com.    3600   IN  HTTPS  1 . alpn="h2,h3" ipv4hint=192.0.2.10

Priority 0 is alias mode; 1 or more is service mode, and a target of . in service mode means "this same name".

TLSA

Pins a TLS certificate or key to a service (DANE, RFC 6698). It only provides security when the zone is DNSSEC-signed. It is used mostly between mail servers.

_25._tcp.mail.example.com.  3600  IN  TLSA  3 1 1 1CFC98A706...

Fields: certificate usage, selector, matching type, data. 3 1 1 means the SHA-256 digest of the server's own public key.

Checking records with dig

dig example.com A +short               # just the answer
dig example.com MX                     # full response, including TTLs
dig @1.1.1.1 example.com TXT           # ask one specific resolver
dig @ns1.provider.example example.com  # ask the authoritative server, skipping caches
dig +trace example.com                 # follow delegation from the root
dig -x 192.0.2.10                      # reverse (PTR) lookup
dig +dnssec example.com A              # include DNSSEC signatures

Reading the response code

Related

Last updated