What Is DNS and Why Does It Matter?
The Domain Name System (DNS) is the internet's address book. When someone types your domain into a browser, DNS translates that human-readable name into the IP address of the server where your site lives. Understanding DNS records gives you direct control over how your domain behaves — where it points, how email is routed, and how your identity is verified online.
The A Record
The A record (Address record) maps a domain or subdomain to an IPv4 address. It's the most fundamental DNS record and the one you'll configure most often.
Example:
example.com → 192.0.2.1
www.example.com → 192.0.2.1
Use it when: you want your domain to point to a specific server's IP address.
The AAAA Record
The same as an A record, but for IPv6 addresses. As IPv6 adoption grows, adding AAAA records alongside your A records ensures your site is reachable over both protocols.
The CNAME Record
A CNAME (Canonical Name) record maps one domain name to another domain name, rather than directly to an IP. This is useful for creating aliases.
Example:
shop.example.com → stores.shopplatform.com
Use it when: you want a subdomain to follow wherever another domain points — useful for third-party services like e-commerce platforms, marketing tools, or CDNs. Note: you cannot use a CNAME on the root domain (apex domain) — only on subdomains.
The MX Record
MX records (Mail Exchange) direct incoming email for your domain to the correct mail servers. They include a priority number — lower numbers are tried first.
Example:
example.com MX 10 mail.example.com
example.com MX 20 mail-backup.example.com
Use it when: setting up email hosting or migrating to a service like Google Workspace or Microsoft 365.
The TXT Record
TXT records store arbitrary text associated with your domain. They're used for domain verification and email authentication.
Common uses include:
- SPF — Specifies which mail servers are allowed to send email from your domain
- DKIM — A public key used to verify email signatures
- DMARC — Defines what happens to emails that fail SPF/DKIM checks
- Domain verification — Proving ownership to Google Search Console, Cloudflare, etc.
The NS Record
NS records (Nameserver records) specify which DNS servers are authoritative for your domain. When you point your domain to a new registrar or DNS provider, updating NS records is the mechanism that makes that change happen.
DNS Propagation: What to Expect
When you change a DNS record, the update doesn't take effect immediately. DNS propagation — the time it takes for changes to spread across global DNS resolvers — can take anywhere from a few minutes to 48 hours, depending on the TTL (Time to Live) value set on the record.
Tip: If you know a change is coming (like a server migration), lower your TTL values to 300 seconds (5 minutes) a day in advance. After the migration, raise them back to 3600 or higher to reduce DNS query load.
Quick Reference Table
| Record Type | Maps | Common Use |
|---|---|---|
| A | Domain → IPv4 | Point domain to server |
| AAAA | Domain → IPv6 | IPv6 connectivity |
| CNAME | Subdomain → Domain | Aliases and third-party services |
| MX | Domain → Mail server | Email routing |
| TXT | Domain → Text string | Verification, SPF, DKIM |
| NS | Domain → Nameservers | DNS authority delegation |