dark mode light mode Search Menu

How Browsers Find Websites

Rainer Stropek on Flickr

Have you ever wondered how computers know how to take names, like kidscodecs.com as a random example, and then find the right computer to talk to? Well the answer is one of those fascinating technical things that makes up the internet: the Domain Name System.

Before we get into the weeds on what the Domain Name System (DNS) is, we first need to make sure we all know some of the basics about how the internet even works.

At the end of the day, the Internet is made up of a bunch of different computers all connected together by a combination of physical wires and radio connections. Each of these computers has a unique address in this combined space. This address is called the IP address. If you’re reading this on any device currently online, you can check the IP address of the device you’re using easily: you go to any number of sites such as https://whatismyipaddress.com/ in order to learn the IP address that the rest of the world sees. I state it that slightly awkward way because inside a home network there’s actually a different IP address but we’ll talk about that more in our article about running servers at home!

Now, one thing you might notice if you use the site mentioned above is that there’s two different addresses listed. This is because there’s the older IPv4, which has “only” 4 billion possible addresses (2^32), and the newer IPv6 which has roughly 16 quadrillion squared (2^128) addresses. To picture a number that huge it’s roughly like if you had enough addresses that each person on Earth would have to own more than 30 sextillion devices (30,000,000,000,000,000,000,000) to exhaust all those IP addresses. Or in even more sci-terms we could have Earth-sized populations on billions of planets across the galaxy and still have enough IP addresses to give to each person billions of unique IP addresses to use for all their nanobot swarms. That’s a lot, in other words.

So that digression aside, how does a computer know how to find another computer just from a URL? Well, let’s propose something more concrete: what if you had a group of friends who all wanted to be able to message each other, how would you handle that? If it’s a smallish group, you could have something like a group chat or text to be able to see everyone’s contact info. But that’s going to get unwieldy quickly. Let’s say your network of people you want to reach grows to be not just close friends but all sorts of people you want to reach: people selling things in your neighborhood, people who have bikes you can borrow, people who are in bands for when you want to put together a block party. That’s going to start being a lot of people quickly.

Now the next thing you might think of is “okay, let’s put it in a google doc”. Okay, well the problem with that is—if you’ve heard the news over the past couple of years—centralized services like Google, Amazon Web Services, things like that do go down sometimes. Maybe you reading this were one of the youth who couldn’t attend class for a day in 2020 because Google’s ability to log you into your account was gone.

So any central repository of contacts is definitely a bad idea.

Okay, so what if everyone had the list of contacts? Well that’s not a terrible idea but it makes maintaining the contacts a lot of work. If there’s any change to someone’s contact info that means you need to send it to literally everyone and make sure they all have it. If there’s only occasional changes that would be okay but let’s imagine six months down the road the number of contacts has gotten huge and you have even just ten or twenty people changing their contact info in a day: that’s going to be a lot of messages telling you to update things you’d probably rather not deal with.

There’s a compromise position, though. What if you distribute the contacts so that not everyone has the whole list but you know who to contact to find out who has it. For example, maybe at the high level you can pick people who are super reliable and not likely to change or drop out to have roles like “know who to contact about musicians” or “know who owns cars”.

Now this doesn’t mean they’ll have everyone’s contact info but that if you ask about a name they have enough info to know who to ask: maybe you divvy it up by neighborhoods or by alphabet or something like that. It doesn’t particularly even matter. The point is that there’s going to be a chain of people who each know who to ask to actually get the information you need. Once you know someone’s contact information, though, you have it for at least awhile. You’ll need to eventually double check that nothing has changed, which means you’ll go through this process again, but for long stretches of time you can just rely on the contacts you have. The only last complication is that you want to set all of this up so that there’s always at least two people you could potentially ask to get someone’s contact info, so that you can’t ever get stalled out in case of an emergency.

And this is basically how DNS takes URLs and finds the computers: there’s top-level servers who know who to ask about URLs that end in .edu or .com or things like that. Then there’s several layers of people-who-know-people kinds of servers that know who to keep asking until you get to the authoritative servers who actually know who people are.

So when you read about DNS it sounds like this is an infrastructure that just exists but what’s important is that you can, in fact, be a part of it. You can run an “authoritative” server for some domain names and contribute to keeping the internet healthy!

Learn More

DNS History


Domain name system


Domain Name System History


Paul Mockapetris


DNS Facts for Kids


DNS Explained


What is an ISP?


World’s first ISP


10 Early USPs


ISP Facts for Kids


How the Internet works


What is a domain name?


How to block inappropriate Domain Name content (for parents)


How to pique students’ interest in learning


How technology can motivate students