Skip to content
Home ยป DNS Records Types

DNS Records Types

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)

RecordPurpose
ADomain โ†’ IPv4
AAAADomain โ†’ IPv6
CNAMEAlias mapping
MXMail server
NSName server
SOAZone authority
PTRReverse DNS
TXTText info
SRVService location

4. Real-World Example

For domain example.com:

  • A record โ†’ Website IP
  • MX record โ†’ Email server
  • CNAME โ†’ www alias
  • 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.