Tech●●●●●Difficulty 2 of 5

How does your browser find a website from just its name?

Computers find each other by numbers. Before DNS arrived in 1983, one text file, updated by phone call, was how the internet's ancestor knew who was who.

▶ Start the story

Your browser asks a global directory called the Domain Name System, DNS. Computers find each other by numerical IP addresses, but people prefer names, so DNS translates human-friendly host names into addresses. It is often called the phone book of the internet, with one important difference: it is not a single book.

It started as one. At the Stanford Research Institute, a text file called HOSTS.TXT mapped host names to the numerical addresses of the computers on the ARPANET. Addresses were assigned manually: to add a machine, you telephoned the Network Information Center, run by Elizabeth Feinler, during business hours. Feinler also suggested domains, such as edu for computers at educational institutions. But by the early 1980s a single, centralized table had become slow and unwieldy. In 1983 Paul Mockapetris created the Domain Name System instead, a design meant to avoid one large central database.

In DNS, no one knows everything and everyone knows who to ask next. Your device usually passes the question to a DNS server run by your internet provider, whose resolver reads the name from right to left. It asks a root server about the last part, such as com, and gets pointed to the servers responsible for that domain, and then to ever more specific servers, until one of them gives the actual answer. Because that information rarely changes within hours, intermediate servers and your own browser cache the answers, so a repeated question can be answered from a cache instead of climbing the chain again.

Looking up a name
  1. Step 1: You type a name

    The resolver reads it right to left

  2. Step 2: Root server

    Points to the servers of the top-level domain

  3. Step 3: More specific servers

    Each one points further down

  4. Step 4: The answer

    An IP address comes back

  5. Step 5: Cached

    Kept until its time to live runs out

Quiz me

0/3

  1. 1.Why did the internet's early single HOSTS.TXT file stop working?
  2. 2.Why does a change to a domain's records not appear everywhere at once?
  3. 3.Why are there only thirteen root server addresses, yet far more root servers in practice?

Recap

Nobody knows everything in DNS; each server knows who to ask next, and answers are cached for a time to live.

💡 A trick to remember it · Ask the root, follow the pointers, cache the answer, and wait out the time to live.

Surprising fact · There are 13 root server addresses but 1954 root server instances, thanks to anycast.

Sources (2)

No source, no claim. Every fact in this lesson (17 claims) cites at least one of these.

  1. [1]Domain Name System · Wikipedia
  2. [2]Root name server · Wikipedia
More lessons in 💻 Tech (3) See all tech lessons →

One more light on your map.

Get one lesson like this every day, about the things you love. Free, in two or five minutes.

Get the share card for this lesson ↗