Last updated
DNS Record Types
DNS (Domain Name System) records map domain names to various types of data. Each record type serves a specific purpose: A records map to IPv4 addresses, AAAA to IPv6, MX to mail servers, CNAME to aliases, and TXT to arbitrary text (used for SPF, DKIM, and domain verification).
Common DNS Record Types
| Type | Purpose | Example Value |
|---|---|---|
| A | IPv4 address | 93.184.216.34 |
| AAAA | IPv6 address | 2606:2800:220:1:248:1893:25c8:1946 |
| CNAME | Alias to another domain | www → example.com |
| MX | Mail server | 10 mail.example.com |
| TXT | Text data (SPF, DKIM, verification) | v=spf1 include:_spf.google.com ~all |
| NS | Nameserver | ns1.example.com |
| SOA | Start of Authority | Zone metadata |
| SRV | Service location | _sip._tcp 10 20 5060 sip.example.com |
| CAA | Certificate Authority Authorization | 0 issue "letsencrypt.org" |
DNS Zone File Format
Text
; Zone file for example.com
$ORIGIN example.com.
$TTL 3600
@ IN SOA ns1.example.com. admin.example.com. (
2026032201 ; Serial (YYYYMMDDNN)
3600 ; Refresh
900 ; Retry
604800 ; Expire
300 ) ; Minimum TTL
; Nameservers
@ IN NS ns1.example.com.
@ IN NS ns2.example.com.
; A records
@ IN A 93.184.216.34
www IN A 93.184.216.34
; Mail
@ IN MX 10 mail.example.com.
; SPF
@ IN TXT "v=spf1 include:_spf.google.com ~all"