Skip to content
doubtly

1 answer

DNS (Domain Name System) translates a host name such as www.example.com into its IP address using a distributed hierarchy of servers (root, TLD and authoritative), contacted by a local (recursive) resolver.

DNS hierarchy

                 . (root servers)
          /         |          \
       .com        .org        .in      (TLD servers)
        |                        |
   example.com               ac.in     (authoritative servers)
        |
  www.example.com

Steps in resolving www.example.com

  Browser/Host               Local DNS resolver
      | 1. query  ------------------> |
      |                               | 2. ------> Root server
      |                               | 3. <------ "ask .com TLD"
      |                               | 4. ------> .com TLD server
      |                               | 5. <------ "ask ns.example.com"
      |                               | 6. ------> Authoritative server
      |                               | 7. <------ IP = 93.184.x.x
      | 8. <------ IP address ------- |
  9. Browser connects to the IP
  1. The user types www.example.com. The host first checks the browser cache, OS cache and hosts file. If not found, the stub resolver sends a query to the local DNS server (ISP or configured resolver, e.g. 8.8.8.8).
  2. If the local server has no cached answer, it asks a root server.
  3. The root server does not know the IP but replies with the addresses of the .com TLD servers (a referral).
  4. The local server queries a .com TLD server.
  5. The TLD server replies with the address of the authoritative name server for example.com.
  6. The local server queries the authoritative server.
  7. The authoritative server returns the A (IPv4) or AAAA (IPv6) record.
  8. The local server caches the answer for its TTL and returns it to the host.
  9. The browser opens a connection to that IP address.

Recursive vs iterative. The host-to-local-server query is recursive (the local server must return the final answer). The local server's queries to root, TLD and authoritative servers are iterative (each returns a referral).

Other points: DNS normally uses UDP port 53 (TCP for large responses and zone transfers); caching at every level reduces load and delay; common record types are A, AAAA, CNAME, MX, NS, PTR (reverse lookup).

Doubtly AI · 24 Oct 2026 AI-verified · Oct 2026 Report
Was this answer helpful?

Your answer

Log in or create a free account to answer this question.