DNS Records - Your Memory Refresher Guide đ
by Jeongjin Kim
Ever stared at your DNS settings panel and thought âWait, whatâs the difference between an A record and a CNAME again?â Youâre definitely not alone. After a few weeks away from DNS configuration, all those record types start blending together. This guide will help you rebuild that mental model and understand whatâs actually happening when you set up your domain.
Whatâs DNS Anyway?
Think of DNS (Domain Name System) as the internetâs phonebook. When you type example.com into your browser, DNS translates that human-friendly name into an IP address like 192.0.2.1 that computers actually understand.
DNS records are the individual entries in this phonebookâeach one contains specific information about how to handle requests for your domain.
The Big Picture: Record Types at a Glance
Before diving deep, hereâs a quick reference table youâll want to bookmark:
| Record Type | Purpose | Example |
|---|---|---|
| A | Maps domain to IPv4 address | example.com â 123.123.123.123 |
| AAAA | Maps domain to IPv6 address | example.com â 2001:0db8:85a3::7334 |
| CNAME | Creates domain alias | www.example.com â example.com |
| NS | Specifies authoritative nameservers | example.com â ns1.dnsprovider.com |
Now letâs break these down properly.
A Record: The Foundation
The A record (Address Record) is the most fundamental DNS record. Itâs what actually connects your domain name to a serverâs location.
What it does: Maps a domain name directly to an IPv4 address
Why you need it: This is how browsers find your website
Example:
example.com A 192.0.2.1
When someone types example.com into their browser, DNS looks up the A record and says âAh, thatâs at 192.0.2.1!â Then the browser connects to that IP address.
Real-World Scenario
Imagine youâre launching a new web application. Youâve got a server at 203.0.113.10 and you just registered myapp.com. You create an A record:
myapp.com A 203.0.113.10
Now when users visit myapp.com, theyâre connecting directly to your server. Simple, clean, effective.
AAAA Record: The IPv6 Cousin
The AAAA record (pronounced âquad-Aâ) is basically the A recordâs modern sibling.
What it does: Maps a domain name to an IPv6 address
Why it exists: IPv4 addresses are running out. IPv6 solves this with a massive address space.
Example:
example.com AAAA 2001:0db8:85a3:0000:0000:8a2e:0370:7334
A vs AAAA: The Quick Comparison
| Feature | A Record | AAAA Record |
|---|---|---|
| IP Version | IPv4 (32-bit) | IPv6 (128-bit) |
| Address Format | 203.0.113.10 | 2001:db8::1 |
| Address Space | ~4.3 billion addresses | 340 undecillion addresses (yeah, thatâs a real number) |
| Current Usage | Universal | Growing rapidly |
Why You Should Care About IPv6
Hereâs the thing: IPv4 addresses ran out years ago. Weâre currently using various workarounds (like NAT) to keep things running, but IPv6 is the future. Major platformsâGoogle, Facebook, Netflixâare already fully IPv6 enabled.
Pro tip: Run both A and AAAA records. Some networks and devices prefer IPv6, while others still rely on IPv4. Having both ensures maximum compatibility.
example.com A 203.0.113.10
example.com AAAA 2001:db8:85a3::1
CNAME Record: The Alias Master
CNAME (Canonical Name) records create aliases. Instead of pointing to an IP address, they point to another domain name.
What it does: Creates an alias from one domain to another
Why you need it: Avoid duplicate configuration and simplify management
Example:
www.example.com CNAME example.com
When someone visits www.example.com, DNS says âThatâs actually just example.comâ and then looks up the A record for example.com.
When CNAME Shines
Scenario 1: Subdomain Management
Youâre running multiple services under one domain:
www.example.com CNAME example.com
blog.example.com CNAME example.com
shop.example.com CNAME example.com
Now if you change servers (and thus your IP address), you only need to update the A record for example.com. All the CNAMEs automatically follow.
Scenario 2: CDN Integration
You want to use Cloudflareâs CDN:
cdn.example.com CNAME example.cloudflarecdn.com
Your CDN provider can manage the underlying infrastructure while you keep a simple CNAME in your DNS.
The CNAME Gotcha
Hereâs something that trips people up constantly: you cannot use a CNAME alongside other records for the same hostname.
This is invalid:
example.com A 192.0.2.1
example.com CNAME somewhere.else.com â CONFLICT!
But this is fine:
example.com A 192.0.2.1
www.example.com CNAME example.com â
Different hostnames
Why? The DNS specification requires that a CNAME record be the only record for that exact name. Itâs an exclusive relationship.
NS Record: The Authority Delegation
NS records (Name Server records) are meta-recordsâthey control which DNS servers are authoritative for your domain.
What it does: Specifies which nameservers handle DNS queries for your domain
Why it matters: These records determine where all DNS lookups for your domain are sent
Example:
example.com NS ns1.dnsprovider.com
example.com NS ns2.dnsprovider.com
How NS Records Work
When someone queries your domain:
- Their DNS resolver asks the root DNS servers âWho handles
.com?â - Root servers respond with the
.comTLD nameservers - The resolver asks TLD servers âWho handles
example.com?â - TLD servers respond with your NS records:
ns1.dnsprovider.comandns2.dnsprovider.com - The resolver finally asks those nameservers for the actual A, AAAA, CNAME records
Key insight: NS records are like forwarding addresses. They tell the world âFor anything about this domain, ask these servers.â
Multiple Nameservers: Redundancy
Youâll typically see 2-4 NS records for reliability:
example.com NS ns1.dnsprovider.com
example.com NS ns2.dnsprovider.com
example.com NS ns3.dnsprovider.com
example.com NS ns4.dnsprovider.com
If one nameserver goes down, the others can still respond. This is critical for availability.
Understanding the Host Field: @, www, and *
When youâre configuring DNS, the âhostâ or ânameâ field can be confusing. Letâs demystify the common symbols:
The @ Symbol (Root Domain)
@ represents your root domainâthe domain itself without any subdomain prefix.
@ A 192.0.2.1
This creates a record for example.com (not subdomain.example.com).
The www Prefix
This is the classic subdomain for web services:
www CNAME example.com
Creates a record for www.example.com pointing to example.com.
The * Wildcard
The wildcard matches any subdomain that doesnât have a specific record:
* A 192.0.2.1
This means anything.example.com will resolve to 192.0.2.1 unless thereâs a more specific record.
Example with specifics:
example.com A 192.0.2.1
www.example.com CNAME example.com
api.example.com A 192.0.2.2
* A 192.0.2.1
Results:
example.comâ 192.0.2.1 (root A record)www.example.comâ 192.0.2.1 (CNAME to root)api.example.comâ 192.0.2.2 (specific A record)random.example.comâ 192.0.2.1 (wildcard catches it)foo.bar.example.comâ 192.0.2.1 (wildcard catches it)
Common Host Field Patterns
| Host | Creates | Common Use |
|---|---|---|
@ |
example.com | Root domain |
www |
www.example.com | Web services |
mail |
mail.example.com | Mail server |
api |
api.example.com | API endpoint |
ftp |
ftp.example.com | File transfer |
* |
*.example.com | Wildcard catchall |
Industry Trends: Whatâs Happening Now
Cloud-Native DNS Services
Traditional DNS hosting is giving way to cloud-native solutions. AWS Route 53, Cloudflare DNS, and Google Cloud DNS offer:
- Global distribution: Faster lookups from anywhere
- Advanced traffic management: Geolocation routing, weighted routing
- Integrated security: Built-in DDoS protection, DNSSEC
- Programmable infrastructure: Manage DNS via API
If youâre running anything beyond a hobby project, using a specialized DNS service is practically mandatory now.
CDN Integration is Standard
Every major website uses CDN services like Cloudflare, Akamai, or Fastly. CNAME records make this integration trivial:
cdn.example.com CNAME example.cdn.cloudflare.net
Your CDN provider handles the global edge network while you maintain a simple DNS record.
IPv6 Adoption is Accelerating
According to Googleâs IPv6 statistics, over 40% of users now access their services via IPv6. For mobile networks, itâs even higherâoften 70-80%.
Reality check: If youâre launching a mobile app or targeting markets with high mobile penetration (like India, China, or most of Asia), IPv6 isnât optional anymore.
example.com A 203.0.113.10 # IPv4
example.com AAAA 2001:db8::1 # IPv6
Run both. Always.
DNS Security (DNSSEC) is Going Mainstream
DNSSEC adds cryptographic signatures to DNS records, preventing spoofing attacks. Major TLDs (.com, .net, .org) support it, and hosting providers are making it easier to enable.
Without DNSSEC, an attacker could redirect yourbank.com to their fake site. With DNSSEC, such tampering is cryptographically provable and rejected.
Practical Tips: Getting It Right
For New Projects (Short-Term Strategy)
- Start with the basics: Set up A records and one CNAME for www
example.com A 192.0.2.1 www.example.com CNAME example.com - Add IPv6 early: Donât wait until you âneedâ it
example.com AAAA 2001:db8::1 -
Use a proper DNS provider: Donât rely on your domain registrarâs free DNSâitâs often slow and limited
- Set reasonable TTLs: During initial setup, use short TTLs (300 seconds) so mistakes can be corrected quickly
For Growing Services (Long-Term Strategy)
- Choose enterprise DNS: Evaluate AWS Route 53, Cloudflare, or Google Cloud DNS based on:
- Global presence
- Security features (DDoS protection, DNSSEC)
- Traffic routing capabilities
- API integration for automation
-
Implement monitoring: DNS downtime is total downtime. Monitor your NS records and query response times
-
Plan for IPv6 transition: Government agencies, large enterprises, and global services should aggressively adopt IPv6
-
Enable DNSSEC: Especially for financial services, healthcare, or any site handling sensitive data
- Document your DNS architecture: Future you (or your successor) will thank you
A Real-World Example: E-Commerce Site
Letâs say youâre building shop.example.com with these requirements:
- Main site on AWS
- CDN for static assets
- Separate API server
- Email via Google Workspace
- IPv4 and IPv6 support
Your DNS configuration might look like:
; Root domain
example.com A 203.0.113.10
example.com AAAA 2001:db8::1
; Web services
www.example.com CNAME example.com
shop.example.com A 203.0.113.20
shop.example.com AAAA 2001:db8::2
; CDN for assets
cdn.example.com CNAME shop.cloudfront.net
; API server
api.example.com A 203.0.113.30
api.example.com AAAA 2001:db8::3
; Email (MX records - not covered here, but you get the idea)
example.com MX 10 aspmx.l.google.com
; Nameservers
example.com NS ns1.dnsprovider.com
example.com NS ns2.dnsprovider.com
example.com NS ns3.dnsprovider.com
Common Mistakes to Avoid
Mistake 1: Using CNAME at the Root
This is wrong:
example.com CNAME somewhere.else.com â
The DNS specification doesnât allow CNAME at the apex (root) domain because it conflicts with required records like NS and SOA.
Solution: Use an A record at the root, or use your DNS providerâs ALIAS/ANAME feature if available.
Mistake 2: Forgetting About TTL
TTL (Time To Live) controls how long DNS records are cached. Setting it too high means changes take forever to propagate. Too low means unnecessary load on your DNS servers.
Good practice:
- During active development: 300 seconds (5 minutes)
- For stable production: 3600 seconds (1 hour)
- Before making changes: Lower TTL 24 hours in advance
Mistake 3: Not Having Redundant Nameservers
Relying on a single NS record is asking for trouble. Always have at least two, preferably on different networks:
example.com NS ns1.dnsprovider.com
example.com NS ns2.dnsprovider.com
Mistake 4: Ignoring IPv6
âNobody uses IPv6 yetâ is simply false. A significant portion of mobile users are IPv6-only or IPv6-preferred. If youâre not providing AAAA records, youâre degrading their experience or blocking them entirely.
Testing Your DNS Configuration
Before you call it done, test your configuration:
Using dig (Command Line)
# Check A record
dig example.com A
# Check AAAA record
dig example.com AAAA
# Check NS records
dig example.com NS
# Check CNAME
dig www.example.com CNAME
# Full trace (see the entire resolution path)
dig +trace example.com
Using nslookup (Windows)
nslookup example.com
Online Tools
- DNS Checker: dnschecker.org - Check propagation globally
- Whatâs My DNS: whatsmydns.net - See DNS responses from different locations
- DNS Lookup: mxtoolbox.com - Comprehensive DNS testing
Wrapping Up
DNS essentials in a nutshell:
- A records: Domain â IPv4 address (the foundation)
- AAAA records: Domain â IPv6 address (the future)
- CNAME records: Domain alias (the convenience)
- NS records: Nameserver delegation (the meta-layer)
Remember:
- Always use multiple NS records for redundancy
- Deploy both A and AAAA records for compatibility
- CNAME canât coexist with other records for the same host
- Test everything before going live
- Use enterprise DNS for production workloads
DNS might seem like plumbingâinvisible infrastructure nobody thinks aboutâbut when it breaks, everything stops. Take the time to understand it properly, and youâll save yourself (and your users) from a world of pain.
Bookmark this page for the next time youâre staring at that DNS configuration panel wondering what all those acronyms mean. Youâll thank yourself later! đ
Subscribe via RSS
Subscribe via RSS