Cover image for DNS Records

DNS Records

March 2, 2025

Record Types

A (Address Record) - Maps a domain to an IPv4 address.

  • Key Note: This is the most common DNS record for resolving domain names to IPv4 addresses.
example.com. IN A 93.184.216.34

AAAA (IPv6 Address Record) - Maps a domain to an IPv6 address.

  • Key Note: Works like an A record but for IPv6 addresses.
example.com. IN AAAA 2606:2800:220:1:248:1893:25c8:1946

CNAME (Canonical Name Record) - Aliases one domain to another (i.e., maps a subdomain to a primary domain).

  • Key Note: Used when you want multiple domain names to point to the same destination.
www.example.com. IN CNAME example.com.

MX (Mail Exchange Record) - Specifies mail servers for a domain.

  • Key Note: Has a priority number, where a lower value means higher priority.
example.com. IN MX 10 mail1.example.com.

SOA (Start of Authority Record) - Contains administrative information about the domain.

  • Key Details:
    • Primary Name Server: Specifies the authoritative DNS server.
    • Admin Email: Contact email for DNS administrator.
    • Serial Number: Helps secondary servers determine updates.
    • Refresh/Retry/Expire/Min TTL: Defines update and cache settings.
example.com. IN SOA ns1.example.com admin.example.com

PTR (Pointer Record) - Reverse DNS lookup (maps an IP address back to a domain).

  • Key Note: Used in reverse DNS for verifying email servers.
34.216.184.93.in-addr.arpa. IN PTR example.com.

TXT (Text Record) - Stores text-based information, often for security and verification.

  • Key Note: Commonly used for SPF, DKIM, DMARC and domain verification.
example.com. IN TXT "v=spf1 include:_spf.google.com ~all"

NS (Name Server Record) - Specifies authoritative name servers for a domain.

  • Key Note: Indicates which DNS servers store the domain’s records.
example.com. IN NS ns1.exampledns.com.

SRV (Service Record) - Specifies services and their locations (used for VoIP, SIP, LDAP).

  • Key Details:
    • Priority: Determines order of preference.
    • Weight: Load balancing between servers.
    • Port: Defines the service port.
_sip._tcp.example.com. IN SRV 10 60 5060 sipserver.example.com.

CAA (Certificate Authority Authorization Record) - Specifies which Certificate Authorities (CAs) can issue SSL/TLS certificates.

  • Key Note: Helps prevent unauthorized SSL certificate issuance.
example.com. IN CAA 0 issue "letsencrypt.org"

SPF (Sender Policy Framework Record) - Specifies authorized mail servers for a domain.

  • Key Note: Stored in TXT records, prevents email spoofing.
example.com. IN TXT "v=spf1 ip4:192.168.0.1/16 -all"

NAPTR (Naming Authority Pointer Record) - Used for advanced redirection and service discovery (e.g., VoIP).

  • Key Details:
    • Order & Preference: Define priority.
    • Flags: Determine how records are interpreted.
    • Service & Regex: Define redirection behavior.
example.com. IN NAPTR 100 10 "u" "E2U+sip" "!^.*$!sip:info@example.com!" .

Final Notes

Core Records: A, AAAA, CNAME, MX, SOA, PTR, TXT, NS ✅ Specialized Records: SRV, CAA, SPF, NAPTR ✅ Security Use: CAA, SPF, TXT (DKIM, DMARC) ✅ Email Handling: MX, SPF, PTR

Check out the link to my original notes below. It was important to me to break down and understand the examples of each record.

view and download DNS Records table with examples

Quiz

Questions are randomized each round.
There are a total of 17 questions for this quiz.