Skip to the main content
Hablox

How DNS turns a name into an address

Nothing on the internet routes to “example.com”. Before your browser can open a connection, something has to turn that name into a number - and it asks up to four different machines to get there.

How DNS turns a name into an address — the interactive part

Step 1 of 7

A name is not an address

You type example.com. Your browser cannot open a connection to a name - it needs an IP address, a number that identifies one machine on the network. Everything that follows exists to find that number.

All 7 steps as text
  1. 1
    A name is not an address

    You type example.com. Your browser cannot open a connection to a name - it needs an IP address, a number that identifies one machine on the network. Everything that follows exists to find that number.

  2. 2
    Check what you already know

    First stop is memory. The browser keeps its own small cache, and the operating system keeps another. If either has looked up example.com recently and the record has not expired, the answer arrives in microseconds and the rest of this never happens.

  3. 3
    Hand the problem to a resolver

    On a miss, your machine asks a recursive resolver - usually one run by your ISP, or one you chose like 1.1.1.1 or 8.8.8.8. “Recursive” is the job description: it agrees to keep asking other servers until it has a real answer, so your browser only has to ask once.

  4. 4
    Start at the root

    The resolver begins at the top. Root servers know almost nothing about example.com - they do not store its address. What they know is which servers are responsible for .com, and that is all the resolver needs to take one step down the tree.

  5. 5
    Ask the .com servers

    Now the resolver asks a .com server. It does not have the address either. It has the delegation: the names of the servers that example.com's owner nominated as authoritative. Each hop narrows the search by one label of the domain.

  6. 6
    Reach the server that actually knows

    The authoritative server is the one holding the zone file for example.com - the record its owner actually publishes. This is the only machine in the chain that can answer the original question, and it returns the A record: 93.184.216.34.

  7. 7
    Answer, and remember

    The resolver passes the address back, and your browser finally opens a connection. Every participant also caches the result for as long as the record's TTL allows - which is why the same lookup a minute later stops at step two instead of walking the whole tree again.

Explanation written by AI

Why walk down a tree at all

No single machine could hold every domain name on the internet, and no organisation should be trusted to. Delegation solves both: the root knows who runs .com, .com knows who runs example.com, and example.com's owner controls their own records. Each level only has to know about the level directly below it.

Why it usually feels instant

The full walk shown here is the worst case. In practice most lookups stop at a cache - yours, your resolver's, or one in between - because popular names have been resolved recently by someone else. The TTL on each record decides how long that shortcut stays valid.

Check your understanding

Which machine in this chain actually stores the address for example.com?

Pick one to check yourself.