Black Friday: 60% off yearly plans with code BF2026, until November 30. See the deal

Learn

How DNS works: from domain name to IP address

DNS works by asking a chain of servers: your device asks a recursive resolver, which asks a root server, then the TLD server, then the domain authoritative nameserver, and returns the IP address from that last answer. Each answer is cached for its TTL.

The short answer
  • Four server roles: recursive resolver, root, TLD and authoritative nameserver.
  • Caches at every layer mean most lookups never reach the authoritative server.
  • There are 13 root server identities, served from over 2,000 instances worldwide.
Try the dns lookupFree, live, no signup

What happens when you type example.com?

  1. 01

    Local caches

    The browser, then the operating system, check their own caches. A fresh entry ends the lookup here.

  2. 02

    Recursive resolver

    The device asks the resolver it is configured to use: your ISP, a company server, or a public one such as 1.1.1.1 or 8.8.8.8.

  3. 03

    Root server

    If nothing is cached, the resolver asks a root server, which replies with a referral to the .com servers.

  4. 04

    TLD server

    A .com server replies with the authoritative nameservers for example.com, taken from your NS records.

  5. 05

    Authoritative nameserver

    It answers from the zone with the A or AAAA record, marked as an authoritative answer.

  6. 06

    Cache and return

    The resolver caches the answer for its TTL and returns it. The browser then connects to the IP.

Authoritative or recursive: what is the difference?

DNS server roles
RoleJobExample
Recursive resolverDoes the lookup work for clients and caches answers1.1.1.1, 8.8.8.8, ISP resolver
Root serverKnows where the TLD servers are13 identities, letters A to M
TLD serverKnows the authoritative nameservers of each domain under the TLDServers for .com, .org, .de
Authoritative nameserverHolds the real records for a zone and answers from themYour DNS host

Roles follow RFC 1034, section 4. Recursion is optional for a nameserver in the original design.

How big is the root server system?

13

Root server identities (A through M) run by 12 independent organizations

Source: root-servers.org

2,046

Operational root server instances listed on 2026-11-21

Source: root-servers.org

2

Minimum nameservers a zone must have

Source: RFC 1034, section 4.1

How can you watch the chain yourself?

dig +trace follows the delegation from the root (macOS / Linux)
dig +trace example.com A
; shows: root servers -> .com servers -> example.com nameservers -> A record

Where does DNS get cached?

Browser

Chromium keeps its own host cache for at least a minute, as its developers document.

Operating system

Windows, macOS and Linux with systemd-resolved each run a local resolver cache. See how to flush DNS.

Resolver

The ISP or public resolver serves many users from one cache, which is why changes reach people at different times.

Where can a lookup go wrong?

  • Local cache holds an outdated answer
  • The resolver is unreachable or slow
  • The TLD still delegates to old nameservers after a change
  • The authoritative server has no record, or returns an error
  • The answer is correct but the server at that IP is down (a DNS success is not a working site)

Common questions

How does DNS work in simple terms?

DNS is a distributed phone book. Your device asks a resolver for a domain IP address. The resolver asks the root, the TLD and finally the domain nameserver, then hands back the address and remembers it for a while.

What is the difference between a recursive and an authoritative DNS server?

An authoritative server holds the actual records for a zone and answers from them. A recursive resolver does not own records; it hunts for answers on behalf of clients by querying other servers and caches the results.

What are the 13 root servers?

There are 13 root server identities, letters A to M, operated by 12 organizations. Each identity is served from many sites, over 2,000 instances in total, so there are far more than 13 machines.

Why is DNS cached?

Caching spreads load and speeds up lookups: most queries are answered from a nearby cache. The record TTL limits how long an answer can be reused, which is why changes take time to appear.

What is a DNS resolver?

A resolver is the server that looks names up for your device. It is usually run by your ISP or a public provider such as Cloudflare or Google, and it checks its cache before asking the root, TLD and authoritative servers.

Watch your domains automatically

Aepto monitors expiry, DNS, SSL and uptime for every domain you own and alerts you when something changes. Free for 3 domains.