Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community!

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Digital Literacy How the Web Works The World Wide Web The Domain Name System

Dns and another server ?

So the domain name gets linked with the Ip adress. But what happens afterwards ? Next to the DNS, you can see another server looking like a black barrel. What is this one for ?

3 Answers

Jessica Murillo
Jessica Murillo
9,119 Points

I found this. It might answer your question I hope: Domain Name Servers (DNS) are the Internet's equivalent of a phone book. They maintain a directory of domain names and translate them to Internet Protocol (IP) addresses. This is necessary because, although domain names are easy for people to remember, computers or machines, access websites based on IP addresses.


So I think if you use the phone book example, you (the computer) would to go through each phone book(DNS) to look for the person's name (Domain Name) with the phone number (IP address) that you (the computer) is looking for.

That is how I understood it. I hope that it is right.

Thank you so much. This example is perfect :) Now I finally got it.

Ryan Ruscett
Ryan Ruscett
23,309 Points


I will try and answer this for you the best I can. Let's start with this example. This is trivial since the internet doesn't just use DNS, there are routers, overlay networking etc. But let's keep it simple.

  1. I am going to go to www.purple.com and then I will go to www.purple.org.

In my browser, I type www.purple.com. This address has no IP at the current moment. It's just a name. My computer says, "Ok I need to figure out where this is". Let me send it to DNS. DNS is a server that has a set of records. Think of it like this.

  1. Record A www.purple.com
  2. Record B www.purple.org

My computer sends the www.purple.com request to the DNS server, which is another computer. That computer says, "AHHH ok, www.purple.com, here is the address. Got it. Now I have to send it to that address:..

I believe the question you are asking is what happens now? Well, this is what happens.

An IP address is broken into chunks we'll call it for simplicity. The first thing the DNS server does is send it to a router. The router looks at the ip much like a DNS does. The router has similar records.

  1. Record A --- > Go to this server/router "ServerTeam1"
  2. Record B ---- > Go to this server/router "ServerTeam2"

The above is CIDR notation. All it's saying is that record no matter what IP address you have. If it starts with 185 or 192, it's going to send it along to the proper server/router.

So now what?

It does it again. Since we are going to www.purple.com with an ip address we got from DNS of, My request was sent to a router. The router said no matter what the IP address is, as long as it starts with 192. Which purple.com does. We continue on down the path to ServerTeam1. ServerTeam 1 has records too.

  1. Record A ----> Go to TeamServer3
  2. Record B ----> Go to TeamServer4
  3. Record C ----> Go to TeamServer5

The ServerTeam1 has a set of records, Our IP we know is So I know by looking at the records, I want to go to TeamServer3. TeamServer 3 will get this request and filter it again and again until it gets to it's destination.

Things to keep in mind.

  1. It doesn't actually always break the ip down into 4 sections like I have done here. Sometimes it breaks it up into many more or sometimes many less hops. A hop being each time the request hits a router to get to it's locations.

  2. Once the IP get's to it's location, this information is cached, which means that each request already knows exactly how to get to the server. This is basis off which overlay networks and SDN's function. But that is wayyy outside the scope treehouse.

Let me know if this helps you better understand or if it just confuses you more.

Thank you for taking time to answer my question.

After rereading your post many times and doing some more research, I think maybe got it.

But my problem is actually way more simple:

Is the domain name server the server where the data of the website is, or does it just translate the domain name into an ip adress ?

1,517 Points

It just translates. It translates a humanly-meaningful, text-based identifier to a system-internal, numeric identification IPv4 or IPv6. After it gets its numeric name it will then proceed to find its server where the website data is.

correct if I am wrong.