DNS Resolution Simulator
Learn how DNS works with an interactive step-by-step simulator. Visualize the DNS hierarchy, understand caching at different levels, and see the difference between recursive and iterative queries.
Category: Networking
Topics covered: dns, networking, educational, interactive, infrastructure
// simulator
DNS Resolution Simulator
Learn how DNS works with an interactive step-by-step simulator. Visualize the DNS hierarchy, understand caching at different levels, and see the difference between recursive and iterative queries.
Ready: A example.com
Goal: Resolve a name from scratch: resolver, root, TLD, then the authoritative server. Pick a domain nobody looked up yet and run the lookup to the end.
Choose a record type and run a DNS lookup.
Resolution path
Understanding DNS Resolution
DNS Hierarchy
- Root Servers (.): The top of the DNS hierarchy. 13 root server clusters worldwide direct queries to TLD servers.
- TLD Servers (.com, .org): Manage top-level domains and point to authoritative nameservers.
- Authoritative Servers: Hold the actual DNS records for specific domains.
- Recursive Resolvers: Your ISP or DNS provider (like 1.1.1.1 or 8.8.8.8) that does the lookup work.
DNS Record Types
- A Record: Maps domain to IPv4 address (e.g., 192.168.1.1).
- AAAA Record: Maps domain to IPv6 address (e.g., 2001:db8::1).
- CNAME Record: Alias pointing to another domain name.
- MX Record: Mail server for the domain.
Key concepts
- TTL (Time To Live): How long a DNS record can be cached before needing refresh.
- Recursive query: The resolver does all the work and returns the final answer.
- Iterative query: Each server returns a referral; the client follows the chain.
- DNS caching: Happens at browser, OS, and resolver levels to speed up lookups.
Overview
Every time you open a website, a DNS lookup turns its name into an address, and most lookups never reach the authoritative server at all. This simulator walks a query through each layer. It checks the browser cache, then the operating system cache, then asks a recursive resolver. On a cache miss the resolver asks a root server, which refers it to the server for the top-level domain, which refers it to the authoritative server that holds the actual record. The answer travels back and is cached at each layer for as long as its TTL allows. You can type a domain and choose the record type, such as A for an IPv4 address, AAAA for IPv6, CNAME for an alias or TXT for text records, then run the lookup step by step. Run it a second time and the caches answer immediately, which is why changing a DNS record does not take effect everywhere at once and why a low TTL before a migration matters.
Try this
- Look up example.com as an A record and step through the root, TLD and authoritative servers.
- Run the same lookup again and see the browser or OS cache answer without leaving your machine.
- Switch the record type to CNAME or TXT and compare the answer with the A record.
Frequently asked questions
- What happens when I type a domain name into my browser?
- The browser and operating system check their caches. If the answer is not cached, a recursive resolver looks it up by asking a root server, then the TLD server, then the domain authoritative server, and returns the address.
- What is a DNS TTL?
- Time to live: the number of seconds a resolver may cache a record before asking again. Lowering it before a change lets the new value spread faster.
- What is the difference between an A record and a CNAME record?
- An A record maps a name to an IPv4 address. A CNAME makes a name an alias for another name, and the resolver then looks up the target. A CNAME cannot sit at the zone apex alongside other records.
Try next
// simulator
Email Authentication Lab: SPF, DKIM and DMARC
Publish SPF, DKIM and DMARC records, send mail directly and through a forwarder or mailing list, and inspect the receiver’s authentication verdict, alignment and disposition.
// simulator
HTTP/1.1 vs HTTP/2 vs HTTP/3 Lab
Load one page over HTTP/1.1, HTTP/2, and HTTP/3. Compare connection setup, multiplexed streams, TCP head-of-line blocking, and QUIC loss recovery in a request waterfall.
// simulator
CDN Edge Cache Lab
Set HTTP cache headers, send traffic through Frankfurt, Virginia and Singapore CDN edges, deploy, purge and inspect shared-cache hits, misses and 304 revalidation.