Day 04 Advanced Patterns

DNS: How Names Become IPs

A, AAAA, CNAME, MX, TXT records explained. Debug DNS issues. Configure a custom domain.

~1 hour Hands-on Precision AI Academy

Today's Objective

Learn the core concepts of DNS: How Names Become IPs and apply them in practical exercises.

01

DNS Record Types

Record types
Record types
A      → name → IPv4 address
       example.com.  A  93.184.216.34

AAAA   → name → IPv6 address

CNAME  → alias → canonical name
       www  CNAME  example.com.

MX     → mail exchange server
       @  MX  10  mail.example.com.

TXT    → arbitrary text
       @ TXT  'v=spf1 include:_spf.google.com ~all'
       @ TXT  'google-site-verification=abc123'

NS     → nameserver for this domain

TTL    → time-to-live: how long to cache the record (seconds)
Debugging DNS
Debugging DNS
# Basic lookup
dig example.com
nslookup example.com

# Specific record type
dig example.com MX
dig example.com TXT
dig www.example.com CNAME

# Authoritative nameserver
dig example.com NS

# Trace the full resolution
dig +trace example.com

# Check propagation (different DNS servers)
dig @8.8.8.8 example.com    # Google DNS
dig @1.1.1.1 example.com    # Cloudflare DNS
dig @9.9.9.9 example.com    # Quad9 DNS
💡
DNS changes take time to propagate because of TTL. If you change a record with TTL=3600 (1 hour), some users might still get the old IP for up to an hour. Set TTL to 300 (5 min) before making changes. Restore to 3600 after.

Supporting References & Reading

Go deeper with these external resources.

MDN Web Docs
DNS: How Names Become IPs HTTP reference and guides.
YouTube
DNS: How Names Become IPs Networking fundamentals for developers
MDN
MDN Web Docs Comprehensive web technology reference

Day 4 Checkpoint

Before moving on, confirm understanding of these key concepts:

Continue To Day 5
Day 5 of the Networking for Developers course