Understanding DNS Record Types

Domain Name System (DNS) records play a critical role in how the internet functions.
These records are instructions that tell the DNS how to handle requests for your domain.
Each type serves a specific purpose in helping users connect to your online services.

Common DNS Record Types

A Record (Address Record)

The most basic DNS record type, mapping a domain name to an IPv4 address.

1
example.com.    IN    A    192.0.2.1

This record tells DNS: “When someone wants to visit example.com, send them to the server at IP address 192.0.2.1.”

AAAA Record (IPv6 Address Record)

Similar to A records but maps to IPv6 addresses instead of IPv4.

1
example.com.    IN    AAAA    2001:0db8:85a3:0000:0000:8a2e:0370:7334

CNAME Record (Canonical Name)

Creates an alias from one domain name to another. Useful for subdomains.

1
blog.example.com.    IN    CNAME    example.com.

This means blog.example.com points to the same IP address as example.com.

MX Record (Mail Exchange)

Directs email to mail servers. Includes priority values to determine backup servers.

1
example.com.    IN    MX    10    mail.example.com.

The “10” represents priority - lower numbers have higher priority.

TXT Record (Text)

Stores text information for various purposes, including domain verification, SPF, DKIM.

1
example.com.    IN    TXT    "v=spf1 include:_spf.example.com ~all"

NS Record (Name Server)

Specifies the authoritative DNS servers for your domain.

1
2
example.com.    IN    NS    ns1.dnshost.com.
example.com. IN NS ns2.dnshost.com.

SOA Record (Start of Authority)

Contains administrative information about your domain, including:

  • Primary nameserver
  • Admin email address
  • Serial number
  • Refresh interval
  • Retry interval
  • Expiration time
  • Minimum TTL

PTR Record (Pointer)

The reverse of A records - maps IP addresses to domain names for reverse DNS lookups.

1
1.2.0.192.in-addr.arpa.    IN    PTR    example.com.

SRV Record (Service)

Specifies location of services, commonly used for VoIP, instant messaging, etc.

1
_sip._tcp.example.com.    IN    SRV    10 60 5060 sipserver.example.com.

CAA Record (Certificate Authority Authorization)

Specifies which certificate authorities are allowed to issue certificates for your domain.

1
example.com.    IN    CAA    0 issue "letsencrypt.org"

DNSKEY and DS Records

Used in DNSSEC (DNS Security Extensions) to validate that DNS responses haven’t been tampered with.

Time To Live (TTL)

All DNS records include a TTL value that determines how long DNS resolvers should cache the record before requesting updated information.

Resources for Further Reading

Understanding these record types allows you to properly configure your domain for web hosting, email, security, and various services that make up your online presence.


Understanding DNS Record Types
https://www.hardyhu.cn/2025/02/03/Understanding-DNS-Record-Types/
Author
John Doe
Posted on
February 3, 2025
Licensed under