DNS Record Types Explained!

Listen to this Post

DNS (Domain Name System) records are essential for directing internet traffic, managing email delivery, and ensuring secure connections. Here’s a detailed breakdown of common DNS record types:

  1. A Record (Address Record) πŸ“ – Maps a domain to an IPv4 address (e.g., example.com β†’ 192.0.2.1).
  2. AAAA Record (Quad-A Record) πŸ“ˆ – Maps a domain to an IPv6 address (e.g., example.com β†’ 2001:0db8:85a3::8a2e:0370:7334).
  3. CNAME Record (Canonical Name) πŸ”— – Redirects an alias to another domain (e.g., www.example.com β†’ example.com).
  4. MX Record (Mail Exchange) πŸ“¨ – Specifies mail servers for email delivery (e.g., example.com β†’ mail.example.com).
  5. NS Record (Name Server) πŸ“Š – Indicates authoritative DNS servers for a domain (e.g., example.com β†’ ns1.example.com).
  6. PTR Record (Pointer) πŸ”™ – Maps an IP to a domain (reverse DNS, used for email verification).
  7. TXT Record (Text) πŸ“ – Stores text-based data (e.g., SPF, DKIM, DMARC for email security).
  8. SRV Record (Service) πŸ“ž – Defines services like VoIP or SIP (e.g., _sip._tcp.example.com β†’ 5060).
  9. SOA Record (Start of Authority) πŸ“„ – Contains admin details, serial number, and zone transfer info.
  10. CAA Record (Certificate Authority Authorization) πŸ”’ – Restricts which CAs can issue SSL/TLS certs.

You Should Know:

1. Querying DNS Records

Use these commands to check DNS records:

Linux/macOS (dig, nslookup)

dig example.com A  Check A record 
dig example.com MX  Check MX record 
nslookup -type=PTR 1.2.3.4  Reverse DNS lookup 

Windows (nslookup)

nslookup -type=A example.com 
nslookup -type=MX example.com 

2. Modifying DNS Records

If managing DNS via CLI (e.g., BIND):

 Edit zone file (BIND) 
sudo nano /etc/bind/db.example.com

Add a sample A record 
@ IN A 192.0.2.1 
www IN CNAME example.com 

3. Email Security (TXT Records)

To set up SPF, DKIM, and DMARC:

example.com. IN TXT "v=spf1 mx -all" 
_dmarc.example.com. IN TXT "v=DMARC1; p=reject; rua=mailto:[email protected]" 

4. Testing DNS Propagation

dig +trace example.com  Trace DNS path 
ping example.com  Check if DNS resolves 

What Undercode Say

DNS is the backbone of internet connectivity, ensuring seamless domain resolution, email security, and service discovery. Mastering DNS records is crucial for sysadmins, network engineers, and cybersecurity professionals. Always verify records using dig, nslookup, or online tools like DNS Checker.

πŸ”§ Pro Tip: Use `whois` to check domain ownership:

whois example.com 

πŸš€ Expected Output:

example.com. 3600 IN A 192.0.2.1 
example.com. 3600 IN MX 10 mail.example.com 

Enhance your DNS knowledge with Cloudflare DNS Docs.

References:

Reported By: Shaifali Shaifali – Hackers Feeds
Extra Hub: Undercode MoN
Basic Verification: Pass βœ…

Join Our Cyber World:

πŸ’¬ Whatsapp | πŸ’¬ TelegramFeatured Image