Here is a comprehensive list of DNS record types, along with their purposes and examples:
1. A (Address) Record
- Purpose: Maps a domain name to an IPv4 address.
- Example:
example.com. IN A 93.184.216.34
- This record maps
example.comto the IP address93.184.216.34.
2. AAAA (IPv6 Address) Record
- Purpose: Maps a domain name to an IPv6 address.
- Example:
example.com. IN AAAA 2606:2800:220:1:248:1893:25c8:1946
- This record maps
example.comto the IPv6 address2606:2800:220:1:248:1893:25c8:1946.
3. MX (Mail Exchange) Record
- Purpose: Specifies the mail server responsible for receiving emails for the domain.
- Example:
example.com. IN MX 10 mail.example.com.
- This indicates that
mail.example.comis the mail server forexample.com, with a priority of10(lower numbers have higher priority).
4. PTR (Pointer) Record
- Purpose: Used for reverse DNS lookups, mapping an IP address to a domain name.
- Example:
34.216.184.93.in-addr.arpa. IN PTR example.com.
- This maps the IP address
93.184.216.34to the domain nameexample.com.
5. NS (Name Server) Record
- Purpose: Specifies the authoritative name servers for the domain.
- Example:
example.com. IN NS ns1.example.com.
example.com. IN NS ns2.example.com.
- This indicates
ns1.example.comandns2.example.comare the authoritative name servers forexample.com.
6. CNAME (Canonical Name) Record
- Purpose: Creates an alias for a domain name.
- Example:
www.example.com. IN CNAME example.com.
- This means
www.example.comis an alias forexample.com.
7. TXT (Text) Record
- Purpose: Stores arbitrary text, often used for verification or metadata (e.g., SPF, DKIM, or DMARC).
- Example:
example.com. IN TXT "v=spf1 include:_spf.google.com ~all"
- This is an SPF (Sender Policy Framework) record for email verification.
8. SRV (Service) Record
- Purpose: Specifies information about services available for the domain.
- Example:
_sip._tcp.example.com. IN SRV 10 5 5060 sipserver.example.com.
- This specifies a SIP service (
_sip) running onsipserver.example.comover TCP, with priority10, weight5, and port5060.
9. SOA (Start of Authority) Record
- Purpose: Provides information about the domain, including the primary name server and admin email.
- Example:
example.com. IN SOA ns1.example.com. admin.example.com. (
2024010101 ; Serial
3600 ; Refresh
1800 ; Retry
1209600 ; Expire
86400 ) ; Minimum TTL
- This specifies the primary name server,
ns1.example.com, admin emailadmin@example.com, and zone parameters.
10. DNSKEY Record
- Purpose: Stores the public key for DNSSEC validation.
- Example:
example.com. IN DNSKEY 256 3 13 abcdefghijk...
- This is part of DNSSEC, which adds security to DNS.
11. CAA (Certification Authority Authorization) Record
- Purpose: Specifies which certificate authorities (CAs) are allowed to issue certificates for the domain.
- Example:
“`plaintext
example.com. IN CAA 0 issue “letsen