Skip to main content

DNS Resolution

DNS translates a domain name (example.com) into an IP address (93.184.216.34) so the browser knows where to connect.

Resolution Flowchart​

The Four Servers​

ServerRoleExample
RecursorYour ISP or resolver (e.g. 8.8.8.8) — asks on your behalfGoogle DNS, Cloudflare 1.1.1.1
Root NameserverKnows where TLD servers are — 13 root server clusters globallya.root-servers.net
TLD NameserverKnows authoritative servers for .com, .io, etc.Verisign for .com
Authoritative NameserverHas the actual records for your domainYour registrar / Route53 / Cloudflare

Common DNS Record Types​

RecordPurposeExample
ADomain → IPv4example.com → 93.184.216.34
AAAADomain → IPv6example.com → 2606:2800::1
CNAMEAlias to another domainwww → example.com
MXMail server for domainexample.com → mail.example.com
TXTArbitrary text (SPF, DKIM, verification)SPF record
NSAuthoritative nameservers for domainns1.cloudflare.com

TTL and Caching​

DNS results are cached at each layer for the duration of the TTL (Time To Live) set on the record.

  • Low TTL (60–300s): faster failover, but more DNS queries
  • High TTL (3600–86400s): fewer queries, slower propagation of changes

My rule: Keep TTL low when a change is coming (migration, failover), then raise it after the change is stable.


Reference​