Common DNS Record Types
| Type | Purpose | Example |
|---|---|---|
| A | Maps domain to IPv4 address | example.com → 93.184.216.34 |
| AAAA | Maps domain to IPv6 address | example.com → 2606:2800:220:1:: |
| CNAME | Alias to another domain | www → example.com |
| MX | Mail server for the domain | 10 mail.example.com |
| TXT | Arbitrary text (SPF, DKIM, verification) | v=spf1 ip4:... -all |
| NS | Authoritative nameservers | ns1.example.com |
| SOA | Zone authority information | Primary NS, admin email, serials |
| SRV | Service location | _sip._tcp.example.com |
| CAA | Certificate Authority Authorization | 0 issue "letsencrypt.org" |
| PTR | Reverse DNS (IP to domain) | 34.216.184.93 → example.com |
A Record
The most fundamental record type, pointing a domain to an IP address:
example.com. 300 IN A 198.48.63.241CNAME Record
Creates an alias. Cannot coexist with other record types at the same name:
www.example.com. 300 IN CNAME example.com.MX Record
Specifies mail servers with priority (lower = preferred):
example.com. 300 IN MX 10 mail.example.com.
example.com. 300 IN MX 20 backup-mail.example.com.TXT Record
Used for SPF, DKIM, domain verification, and more:
example.com. 300 IN TXT "v=spf1 ip4:198.48.63.240/28 -all"CAA Record
Controls which Certificate Authorities can issue SSL certificates for your domain:
example.com. 300 IN CAA 0 issue "letsencrypt.org"
example.com. 300 IN CAA 0 issuewild "letsencrypt.org"Querying DNS Records
dig example.com A +short
dig example.com MX +short
dig example.com TXT +short
dig example.com ANY +noall +answer