Back to blog
InspectionJanuary 1, 2024· 5 min read

DNS Records: A Developer's Practical Guide

A practical Fusebox guide to dns records.

DNS Records: A Developer's Practical Guide

Published: January 2024
Reading time: 8 minutes

DNS is the internet's address book. When things break, it's often DNS. Here's what you need to know to debug issues, plan migrations, and understand how websites actually work.

DNS Basics in 30 Seconds

When someone types your domain:

  1. Browser asks DNS: "Where is example.com?"
  2. DNS responds: "It's at 192.168.1.1"
  3. Browser connects to that IP
  4. Website loads

But there's more. DNS controls email, subdomains, verification, and more.

The Records That Matter

A Record - The Website Address

example.com → 192.168.1.1

What it does: Points domain to IPv4 address When you need it: Every website needs this Common issues: Multiple IPs for load balancing

AAAA Record - The Modern Address

example.com → 2001:0db8:85a3::8a2e:0370:7334

What it does: Points to IPv6 address When you need it: Modern hosting, mobile optimization Reality check: Nice to have, not critical yet

CNAME Record - The Alias

www.example.com → example.com
blog.example.com → myblog.wordpress.com

What it does: Points one domain to another When you need it: Subdomains, third-party services Warning: Can't use on root domain

MX Record - The Email Router

example.com → 10 mail.example.com
example.com → 20 backup-mail.example.com

What it does: Directs email to mail servers The number: Priority (lower = higher priority) Common setup: Google Workspace, Office 365

TXT Record - The Swiss Army Knife

"v=spf1 include:_spf.google.com ~all"
"google-site-verification=ABC123..."

What it does: Stores text data Common uses:

  • Email authentication (SPF, DKIM)
  • Domain verification
  • Security policies

NS Record - The DNS Provider

example.com → ns1.cloudflare.com
example.com → ns2.cloudflare.com

What it does: Delegates DNS to name servers When it changes: Moving DNS providers Critical: Wrong NS = website down

Real Developer Scenarios

Scenario 1: Website Not Loading

Check A Record:

dig example.com A
# or
nslookup example.com

Common issues:

  • No A record = no website
  • Wrong IP = wrong server
  • Multiple IPs = load balanced

Scenario 2: Email Not Working

Check MX Records:

dig example.com MX

What to look for:

;; ANSWER SECTION:
example.com. 300 IN MX 10 aspmx.l.google.com.
example.com. 300 IN MX 20 alt1.aspmx.l.google.com.

No MX records? Email won't route Wrong priority? Mail might be slow Old provider? Migration incomplete

Scenario 3: Subdomain Issues

Problem: api.example.com not working

Check for:

# Specific A record
dig api.example.com A

# Or CNAME
dig api.example.com CNAME

# Or wildcard
dig *.example.com A

Common setups:

# Separate server
api.example.com → 192.168.1.2

# Same server
api.example.com → example.com

# External service
api.example.com → myapp.heroku.com

DNS Propagation: Why Changes Take Time

The Waiting Game

You update DNS. Nothing happens. Why?

  1. TTL (Time To Live): How long DNS is cached

  2. Common TTLs:

    • 300 (5 minutes) - For frequent changes
    • 3600 (1 hour) - Standard
    • 86400 (24 hours) - Stable sites
  3. Propagation reality:

    • Some see changes instantly
    • Others wait hours
    • Full propagation: 24-48 hours

Pro Migration Strategy

Before migration:

1. Lower TTL to 300 (5 minutes)
2. Wait 24 hours
3. Make DNS change
4. Changes propagate in minutes
5. Raise TTL back to 3600

Advanced DNS Patterns

Load Balancing with A Records

example.com → 192.168.1.1
example.com → 192.168.1.2
example.com → 192.168.1.3

DNS returns different IPs randomly.

Subdomain Delegation

# Main site on Vercel
example.com → 76.76.21.21

# API on AWS
api.example.com → 54.123.45.67

# Blog on WordPress
blog.example.com → wordpress.com

Email Security Triple

# SPF - Who can send email
TXT "v=spf1 include:_spf.google.com ~all"

# DKIM - Email signatures
TXT "k=rsa; p=MIGfMA0GCSq..."

# DMARC - What to do with failures
TXT "v=DMARC1; p=quarantine; rua=mailto:..."

Common DNS Mistakes

1. CNAME on Root Domain

# WRONG - Breaks email
example.com CNAME myapp.herokuapp.com

# RIGHT - Use A record or ALIAS
example.com A 52.1.2.3

2. Forgetting WWW

# Only having:
example.com A 192.168.1.1

# Also need:
www.example.com CNAME example.com

3. MX with CNAME

# WRONG
mail.example.com CNAME example.com
example.com MX 10 mail.example.com

# RIGHT
mail.example.com A 192.168.1.2
example.com MX 10 mail.example.com

Quick DNS Debugging

1. Command Line Tools

# Quick lookup
nslookup example.com

# Detailed info
dig example.com ANY

# Trace DNS path
dig +trace example.com

# Check specific server
dig @8.8.8.8 example.com

2. What to Check

Website down?

  • A/AAAA records
  • NS records
  • Domain expiration

Email issues?

  • MX records
  • SPF (TXT record)
  • Mail server A records

SSL problems?

  • CAA records
  • Proper A record

3. Online Tools

  • DNS Checker (propagation)
  • MX Toolbox (email)
  • DNS Lookup (general)

DNS for Different Platforms

Static Sites (Vercel, Netlify)

# Usually CNAME or A
example.com → 76.76.21.21
www.example.com → example.com

Traditional Hosting

# A record to server
example.com → 192.168.1.1
www.example.com → 192.168.1.1

# MX for email
example.com MX → mail.example.com

Cloud Platforms (AWS, GCP)

# Elastic IPs
example.com → 54.123.45.67

# Load balancers
example.com → my-lb-123.elb.amazonaws.com

Security Considerations

1. DNS Hijacking Prevention

  • Use registrar lock
  • Enable 2FA on DNS provider
  • Monitor for changes

2. DDoS Protection

# Hide real server IP
example.com → cloudflare-ip
# Real server IP never exposed

3. CAA Records

# Only Let's Encrypt can issue SSL
example.com CAA 0 issue "letsencrypt.org"

Quick Reference Card

Essential Records for New Site

example.com         A      192.168.1.1
www.example.com     CNAME  example.com
example.com         MX 10  mail.provider.com
example.com         TXT    "v=spf1 include:..."

Migration Checklist

  • List all current DNS records
  • Lower TTL 24 hours before
  • Update records
  • Verify propagation
  • Test everything
  • Restore normal TTL

Common TTL Values

  • Testing: 300 (5 min)
  • Normal: 3600 (1 hour)
  • Stable: 86400 (24 hours)

The Bottom Line

DNS isn't complicated once you understand the patterns. Most issues come from:

  • Missing records
  • Wrong record types
  • Propagation delays
  • Cache issues

Master these basics and you'll solve 90% of DNS problems.


Want instant DNS lookups while browsing? Fusebox shows all DNS records with one click. See A, MX, TXT, and more. $29 one-time purchase.