DNS Records Overview
DNS doesn't just map names to IP addresses. It stores various types of records that serve different purposes. When you configure a domain, you'll work with several record types to connect your domain to websites, email servers, and other services.
Think of DNS records like entries in a comprehensive directory. Some entries list phone numbers, others list physical addresses, and some just say "this person also goes by another name."
Common Record Types
A Record (Address) is the most fundamental type. It maps a domain name directly to an IPv4 IP address. When you want example.com to point to your server at 93.184.216.34, you create an A record.
AAAA Record does the same thing for IPv6 addresses. As the internet transitions to IPv6, these records become increasingly important.
CNAME Record (Canonical Name) creates an alias. Instead of pointing to an IP address, it points to another domain name. If you want www.example.com to go to the same place as example.com, you might create a CNAME pointing www to example.com. The DNS system then looks up example.com's A record.
MX Record (Mail Exchange) tells email servers where to deliver mail for your domain. When someone emails you@example.com, their email server looks up example.com's MX records to find your mail server.
TXT Record stores arbitrary text. These are used for various verification and security purposes — proving you own a domain, configuring email authentication, and more.
How Records Work Together
A typical domain configuration might include:
- An A record pointing the root domain to your web server
- A CNAME pointing www to the root domain
- MX records pointing to your email provider
- TXT records for email security (SPF, DKIM)
Each record type answers a different question about your domain.
TTL: Time to Live
Every DNS record includes a TTL value — how long other servers should cache this record before checking for updates. Short TTLs (like 300 seconds) mean changes propagate quickly but increase DNS traffic. Long TTLs (like 86400 seconds) reduce traffic but mean changes take longer to spread.
When planning DNS changes, consider lowering TTL beforehand so the transition happens faster.