How DNS Works

Watch how a name like example.com becomes an IP address (a numeric address on the network), one hop at a time. See why the second lookup is faster, and what happens when the remembered answer runs out (TTL).

Order of questions

Pick a name and press "Look up".

Resolver cache t = 0

(empty)

Move the clock

A simplified teaching model. Delays and TTLs are made-up values, and seconds are on the model's own clock.

How to play

Your goal is to see how a name turns into a numeric address. Pick a name and press "Look up". The local resolver (the one doing the legwork) asks the root, then the TLD server (for .com and the like), then the authoritative server (the one that holds the answer). Press it again and the remembered answer (the cache) finishes at once. "Move the clock" makes time pass: the TTL (how many seconds an answer is kept) counts down, and records that reach 0 disappear. "Auto" plays the whole story from the start.

Learn more

DNS is like the internet's phone book: it turns a name such as example.com into an IP address. Names form a tree that gets more specific from right to left. The root knows where the .com servers are, a TLD server (such as .com) knows which authoritative server manages example.com, and that authoritative server holds the final answer. A local resolver that goes around asking on your behalf is doing recursive resolution. The rules require "iteration" (a server returns a pointer and the asker follows it), while the server chasing the answer all the way ("recursion") is optional. Each answer carries a TTL in seconds: it may be kept in the cache for that long, then discarded and asked again. That is why later lookups often skip the root, and why it is not always three hops. Records include A (name to IPv4 address) and CNAME (an alias, which costs one extra hop). The names and addresses here are values reserved for documentation (example.com and so on; 192.0.2.x, 198.51.100.x, 203.0.113.x). The root servers have 13 identifiers, A to M, run by 12 organisations, with 2047 operational instances in many places (root-servers.org, checked on 17 October 2026). It is not "13 machines": 13 identifiers are spread over many sites. The delays and TTLs on this screen are made-up model values. A simplified teaching model.

Read more about it: Behind the web: cookies, DNS, video and text generation →