Module 21 · Postcards, Not Phone Calls

If computers use numbers, how does typing a name work?

Lesson 21.3 · The Internet’s Phone Book

Sarah · Rob · Jenny

A name goes in. A number comes back.

Sarah types pettigrewlab.com into the laptop’s browser.

Rob points out that routers only understand IP addresses, which are numbers. So how did a name become a number?

Jenny says the laptop asked, and the answer came back from a chain of computers in about the time it takes to blink.

The short answer

The laptop asks DNS, which works through the levels, .com then pettigrewlab.com, until a server gives back the IP address. It takes a fraction of a second, and next time it’s remembered. Then the packets from 21.2 can go.

Try it yourself

Step through how the laptop finds the address for a website name.

Laptop → DNS server: where is pettigrewlab.com?

Sarah types pettigrewlab.com. The laptop doesn’t know its address, so it asks a DNS server, usually run by the internet provider.

Step 1 of 4

What you just did has a name

DNS

DNS, the Domain Name System, is the internet’s phone book: it turns names people can remember, like pettigrewlab.com, into the IP addresses computers use.

No single computer holds the whole list.

Root servers know who handles .com, .org and the rest; those know who handles each domain; and each domain’s own servers know its addresses.

Answers are cached, saved for a while, so most lookups are instant.

A few more things

Read names right to left

In www.pettigrewlab.com, .com is the top level, pettigrewlab is the domain under it, and www is one name under that. DNS works through the levels in that order.

When DNS breaks

If DNS fails, sites seem to be down even though the internet is fine, because nothing can turn names into addresses. Big outages are sometimes DNS problems.

Fake addresses

Scammers register names that look almost right, like a bank’s name with one letter swapped. DNS will happily send you there. Module 23 covers spotting them.

Go deeper

The longer version, if you want it.

Who runs the top

The root of DNS is handled by a small set of organizations operating root servers, with well over a thousand copies spread around the world so they’re always close and always up.

.com is run by one company, Verisign, under rules set by ICANN, a nonprofit, and you rent a name, like pettigrewlab.com, by the year from a registrar. You never own it outright. Forget to renew and someone else can take it.

Quick check

What does DNS do?

Let’s take it slower

You know your friend’s name but not their phone number, so you look it up in your contacts. DNS is the contacts list for the whole internet, split up so no one has to hold all of it. You type a name, the computer looks up the number, and then it calls the number.

More examples

1

The site that’s “down for everyone”

Sometimes a huge outage turns out to be one company’s DNS failing. The sites were fine; nobody could look up their addresses.

2

A website that moved

When a site moves to a new server, it can take a while to reach it everywhere, because DNS servers around the world still remember the old address.

Back to the question

So how does typing a name work?

Show the answer

The laptop asks DNS, which works through the levels, .com then pettigrewlab.com, until a server gives back the IP address. It takes a fraction of a second, and next time it’s remembered. Then the packets from 21.2 can go.

One last question

Which of these would you trust?

“DNS turns names like pettigrewlab.com into IP addresses.”

“One computer somewhere holds the whole list of every website.”

“If DNS breaks, websites can seem down even when the internet works.”

“A web address that looks right is always the real site.”

Talk Card

Talk Card · 21.3

When you type a website name, your computer first looks up its number in the internet’s phone book. That’s DNS.

How Computers Work · pettigrewlab.com/learn

Next lesson