Menu
Coddy logo textTech

Why Names Exist

Lesson 5 of 47 in Coddy's Networking with the Terminal course.

You have an address to send a request to. So why does anyone type example.com instead of 93.184.216.34?

Two reasons. Addresses are hard to remember, and worse, they change. A site moves to a new host, adds a second server, or switches provider, and the address changes while the name stays exactly the same.

DNS, the Domain Name System, is the phone book that turns a name into an address at the moment you need it. It is a lookup service running quietly behind almost every request you make.

That means every request really has two steps: resolve the name into an address, then connect to that address. Keep them apart in your head, because when something fails, working out which of the two broke is most of the diagnosis. A name that will not resolve never got as far as connecting.

challenge icon

Challenge

Medium

Show that a name is just a stand-in for an address.

  1. Create index.html containing exactly SAME
  2. Serve the folder on port 9103 in the background
  3. Fetch it twice: once using 127.0.0.1 and once using localhost

Both requests reach the same server, so the output is:

SAME
SAME

Try it yourself

Terminal
quiz iconTest yourself

This lesson includes a short quiz. Start the lesson to answer it and track your progress.

All lessons in Networking with the Terminal

Practice on your own: Terminal playground