DNS Record Types
1. Introduction
DNS records (also called Resource Records โ RR) are entries in a DNS database that map domain names to IP addresses and define how DNS queries are handled.
๐ In simple terms:
DNS records tell the internet where to find services like websites, email servers, etc.
2. Common DNS Record Types
1. A Record (Address Record)
- Maps domain name โ IPv4 address
๐ Example:
example.com โ 192.168.1.1
๐ Most commonly used record
2. AAAA Record
- Maps domain name โ IPv6 address
๐ Example:
example.com โ 2001:db8::1
3. CNAME Record (Canonical Name)
- Maps one domain to another domain
๐ Example:
www.example.com โ example.com
๐ Used for aliases
4. MX Record (Mail Exchange)
- Specifies mail servers for a domain
๐ Example:
example.com โ mail.example.com
๐ Used for email delivery
5. NS Record (Name Server)
- Specifies authoritative DNS servers
๐ Example:
example.com โ ns1.example.com
๐ Defines DNS authority
6. SOA Record (Start of Authority)
- Contains administrative information about domain
Includes:
- Primary DNS server
- Email of admin
- Serial number
- Refresh time
๐ Only one SOA record per zone
7. PTR Record (Pointer Record)
- Maps IP address โ domain name
- Used for reverse DNS lookup
๐ Example:
192.168.1.1 โ example.com
8. TXT Record
- Stores text information
Used for:
- Domain verification
- Email security (SPF, DKIM)
๐ Example:
"v=spf1 include:_spf.google.com ~all"
9. SRV Record (Service Record)
- Defines location of services
๐ Example:
_sip._tcp.example.com โ server details
10. SPF Record
- Defines authorized mail servers
๐ Example:
v=spf1 ip4:192.168.1.1 -all
11. DKIM Record
- Used for email authentication
- Stored as TXT record
12. DMARC Record
- Email security policy
- Prevents spoofing
3. Summary Table (Exam-Oriented)
| Record | Purpose |
|---|---|
| A | Domain โ IPv4 |
| AAAA | Domain โ IPv6 |
| CNAME | Alias mapping |
| MX | Mail server |
| NS | Name server |
| SOA | Zone authority |
| PTR | Reverse DNS |
| TXT | Text info |
| SRV | Service location |
4. Real-World Example
For domain example.com:
- A record โ Website IP
- MX record โ Email server
- CNAME โ
wwwalias - TXT โ Email verification
5. Importance of DNS Records
- Enable website access
- Support email delivery
- Provide security (SPF, DKIM)
- Manage domain services
6. Conclusion
DNS record types define how domain names interact with services on the internet. Proper configuration of these records ensures correct routing, security, and efficient communication, making DNS a critical component of networking and server management.
