Computer Networks

How DNS Resolution Works, Step by Step

Follow a single browser request through the full DNS lookup chain, from your local cache to the root servers and back.

Abdullah IslamAbdullah Islam··
Diagram of the DNS resolution lookup chain

When you type a domain name into your browser, a remarkable chain of lookups happens in a fraction of a second. DNS — the Domain Name System — is the phonebook that turns human-friendly names into IP addresses. Here is the whole journey.

Image

This is
Jalani misron

The lookup chain

When you request example.com, the resolver walks through several sources in order until it finds an answer:

  1. Browser and OS cache — recent lookups are remembered locally.
  2. Recursive resolver — usually your ISP or a public service like 1.1.1.1.
  3. Root servers — point to the right top-level domain (.com).
  4. TLD servers — point to the authoritative servers for the domain.
  5. Authoritative servers — return the actual record.

This is why DNS is described as a distributed, hierarchical database. No single server holds everything.

Browser cache -> OS cache -> Recursive resolver
        -> Root server -> TLD server -> Authoritative server

Common record types

Different records serve different purposes:

  • A — maps a name to an IPv4 address.
  • AAAA — maps a name to an IPv6 address.
  • CNAME — an alias for another name.
  • MX — mail servers for the domain.
  • TXT — arbitrary text, often used for verification.

Caching and TTL

Every DNS record carries a Time To Live (TTL) value, measured in seconds, that says how long a resolver may cache the answer. Low TTLs mean faster changes but more queries; high TTLs are faster but slower to update.

If a record changes but the old value is still cached, clients keep seeing the stale answer until the TTL expires. That single fact explains most “it works on my machine” DNS mysteries.

Newsletter

Learn with me

Join the newsletter to receive my latest articles. No spam, unsubscribe anytime.

You'll get a confirmation email. Check your inbox to complete your subscription.

Share this post

About the author

Abdullah Islam

Abdullah Islam

Abdullah Islam is a computer networking learner, tech blogger, and enthusiast who shares simple, practical guides to help others understand networking concepts and build real-world skills.

Comments

Similar posts

More articles on related topics.