Skip to content
StackDecode
System Design
2. Networking FundamentalsAnimated

DNS

The phone book of the internet: names to IP addresses.

The idea

DNS translates a name like example.com to an IP address by asking a chain of servers, with answers cached along the way.

Watch it work

Press play, pause, or step through. Some animations have settings you can change.

BrowserResolverRoot.com TLDAuthoritativewhere is example.com?
  • current message
  • earlier
  • failure or attack

The browser asks its recursive resolver (usually your ISP or a public resolver).

step:
1/8
from:
Browser
to:
Resolver
1/8

Time runs downward. Solid arrows are requests, dashed arrows are replies.

Step by step

  1. 1The browser asks the local resolver
  2. 2The resolver asks root, then TLD, then authoritative servers
  3. 3The answer is returned and cached
  4. 4The browser connects to the IP

Where it is used

Every web request.

Watch out for

Cached records mean changes take time to spread (TTL).

Related