Every website on the internet has a unique address that users can type in to access it from a browser. You’re probably used to seeing these addresses written like www.google.com or www.amazon.co.uk. These are called domain names, and you probably already knew that. But have you ever wondered how typing that domain name in your browser bar actually gets you to a website? Basically, this is what happens:
- The browser uses your unique domain name (“google.com”) to search for the associated IP address.
- The browser finds the server with that IP address.
- The browser looks for the “index” file in a public directory.
- The browser displays this index file as a homepage.
Okay, this is simplifying the whole thing, but this is basically what you need to know.
Want to dig a little deeper?
Every computer connected to the internet has an IP (or Internet Protocol) address—the address that other computers can read to figure out where to send information and where it’s coming from. To find your own, search Google for “what is my ip”—it’ll return your specific IP address atop the search results, and look something like this: 188.8.131.520. Think of this number like your address at home:
123 Something Street, Apartment 1
Some Town, United Kingdom, UK1 1UK
Each of the different parts of your address: street, town, city, etc. help the delivery man find your house. An IP address does the same for internet traffic. If you knew the specific IP address of the server you were trying to access, you could get to a website by typing in just the IP address. This is great for computers, but it would be hard for you and I to remember all of the numbers of our favorite websites. This is why we have domain names.
Domain Names and DNS
Domain names are basically easy-to-remember shortcuts to numeric IP addresses.
So when you type in “yourname.com”, your browser really wants to connect to the associated numeric IP address. DNS, the Domain Name System, is what connects the human-preferred domain names with the computer-preferred IP addresses. You can think of DNS as a giant database that just connects domains to addresses all day long. This all happens in milliseconds, but this is how every web page is actually served to you—the end user. (This is really simplifying everything that happens—if you want to know more details, check out this great How Stuff Works article.)
A server is a special type of computer—different from your own in two major ways. First, it’s always powered on. Second, it’s always connected to the internet. Specifically, it’s always connected to the same IP address so that other computers can always find it. (Again, this is a simplification of the process, check out the How Stuff Works article for the nitty gritty.)
So that's the basics. We hope you found it useful.