Additional Lessons
Lesson 4

DNS Records

By Sai Kurada
August 25, 2023

DNS Records

DNS records are fundamental components of the Domain Name System (DNS) that provide critical information about domain names and how they map to IP addresses and other resources. Each DNS record type serves a specific purpose and contains different types of data.

Here's a detailed explanation of some common DNS record types:

A Record (Address Record):
  • Purpose: Maps a domain name to an IPv4 address.
  • Data Format: A domain name followed by an IPv4 address.
  • Example: example.com. IN A 192.0.2.1

AAAA Record (IPv6 Address Record):
  • Purpose: Maps a domain name to an IPv6 address.
  • Data Format: A domain name followed by an IPv6 address.
  • Example: example.com. IN AAAA 2001:db8::1

CNAME Record (Canonical Name Record):
  • Purpose: Creates an alias for a domain name, allowing one domain to point to another domain.
  • Data Format: A domain name followed by the canonical domain name (the alias).
  • Example: www.example.com. IN CNAME example.com

MX Record (Mail Exchange Record):
  • Purpose: Specifies the mail servers responsible for receiving emails for a domain.
  • Data Format: Priority value, mail server domain name.
  • Example: example.com. IN MX 10 mail.example.com

TXT Record (Text Record):
  • Purpose: Holds text-based information. Used for various purposes such as SPF records for email validation, DKIM keys, and more.
  • Data Format: A domain name followed by the text data enclosed in double quotes.
  • Example: example.com. IN TXT "v=spf1 mx -all"

NS Record (Name Server Record):
  • Purpose: Specifies the authoritative name servers for a domain.
  • Data Format: A domain name followed by the name server's domain name.
  • Example: example.com. IN NS ns1.example.com

PTR Record (Pointer Record):
  • Purpose: Used in reverse DNS lookup to map IP addresses to domain names.
  • Data Format: IP address followed by the domain name.
  • Example: 1.2.3.4.in-addr.arpa. IN PTR example.com

SRV Record (Service Record):
  • Purpose: Specifies information about available services on the network, including service location and protocol.
  • Data Format: Service name, protocol, priority, weight, port, target domain name.
  • Example: _http._tcp.example.com. IN SRV 10 1 80 server.example.com

CAA Record (Certificate Authority Authorization):
  • Purpose: Used to specify which certificate authorities are allowed to issue certificates for a domain.
  • Data Format: Flags, tag, and value.
  • Example: example.com. IN CAA 0 issue "comodoca.com"

SOA Record (Start of Authority Record):
  • Purpose: Contains administrative information about the domain and its zone.
  • Data Format: Primary (master) server, email of responsible person, serial number, refresh time, retry time, expiration time, minimum TTL.
  • Example: example.com. IN SOA ns1.example.com. admin.example.com. (2023082801 7200 3600 1209600 86400)

Each record type serves a specific purpose in managing domain names, IP addresses, mail services, and more. DNS records are crucial for ensuring accurate and reliable communication across the internet and local networks. They are managed by authoritative DNS servers for each domain and are queried by DNS clients to resolve domain names to their corresponding IP addresses and other resources.