Ok, so we need a way of identifying places on the Internet. What we did originally, before the Internet was the Internet, was basically just had a list of all the places. That quickly became infeasible so instead they came up with a method that basically organized everything into a hierarchical structure, kind of like a tree.
At the base of the tree you have a single root, which then has multiple branches, and those branches have branches, and so on, until you get to the leaves.
[www.google.com](https://www.google.com) for example, is a leaf on this tree. Specifically the “www” is a leaf on the “google” branch which is a branch on the “com” root.
Now, the whole point of all of this is for your computer to be able to take a URL like “[www.google.com](https://www.google.com)” and convert it into an IP address because it is the actual IP address that computers need to talk. But, as we said, we can’t just have a big ol’ directory. There is just too much stuff and it’s too dynamic.
Instead, we exploit the hierarchical nature of the tree. We go to the “.com” tree and ask it, “Who is responsible for holding all of the information of the ‘google’ branch?” And it tells us. Then we go to that place and ask it “Ok, who is responsible for holding all of the information of the ‘www’ leaf?” And it tells us, and we go to that place and ask it “Ok, give me the IP information for ‘[www.google.com](https://www.google.com)'” And it tells you, and then your computer can communicate with it.
And it’s basically the same process for e-mails as well, except they’re specifically asking for the e-mail server that handles e-mails for “[google.com](https://google.com)” for which the end answer is the IP address of that e-mail server.
Ok, so we need a way of identifying places on the Internet. What we did originally, before the Internet was the Internet, was basically just had a list of all the places. That quickly became infeasible so instead they came up with a method that basically organized everything into a hierarchical structure, kind of like a tree.
At the base of the tree you have a single root, which then has multiple branches, and those branches have branches, and so on, until you get to the leaves.
[www.google.com](https://www.google.com) for example, is a leaf on this tree. Specifically the “www” is a leaf on the “google” branch which is a branch on the “com” root.
Now, the whole point of all of this is for your computer to be able to take a URL like “[www.google.com](https://www.google.com)” and convert it into an IP address because it is the actual IP address that computers need to talk. But, as we said, we can’t just have a big ol’ directory. There is just too much stuff and it’s too dynamic.
Instead, we exploit the hierarchical nature of the tree. We go to the “.com” tree and ask it, “Who is responsible for holding all of the information of the ‘google’ branch?” And it tells us. Then we go to that place and ask it “Ok, who is responsible for holding all of the information of the ‘www’ leaf?” And it tells us, and we go to that place and ask it “Ok, give me the IP information for ‘[www.google.com](https://www.google.com)'” And it tells you, and then your computer can communicate with it.
And it’s basically the same process for e-mails as well, except they’re specifically asking for the e-mail server that handles e-mails for “[google.com](https://google.com)” for which the end answer is the IP address of that e-mail server.
It’s a hierarchical system of what are called domains, basically it goes from right to left when the address is “resolved”
For example for going to www.google.com you first ask the “.com” DNS server the address of the google server, and then you ask the “.google”server the address of the “www” server and finally you connect. There can be many different domains for a single website, it’s just common practice to have www as the main one, but it doesn’t have to be that
Emails use the same system to know to what server to send your message
Other people got the gist, so as for why there’s a www at all it’s because of history.
These days almost everyone who types in a domain is looking for a web site, but when the web was created the internet had already existed for a while. There were all sorts of different programs and protocols all running on the internet.
So since domain names are used to locate and communicate with particular computers, you could use the “www” to specify that this was the computer I was running a World Wide Web server on, whereas some other machine might be running other different software.
These days, though, it’s much more rare to find other protocols people actually care about, so people just point their main domain at the web server. For small domains without a lot of traffic it’s easy to just run any different server on the same machine, so they can all point to the same place. For bigger domains with tons of traffic one machine is probably to little, so they have “load balancers” where there can be a bunch of identical machines and any traffic that reaches any of them can be forwarded to the right place. So those don’t need the domain to differentiate either, and the practice of having www has fallen out of favour.
If we look at a URL like [http://www.reddit.com/r/explainlikeimfive](http://www.reddit.com/r/explainlikeimfive) this actually contains a lot of information for the computer systems to describe how the webpage gets from the reddit server to your browser. We don’t really read this from left-to-right.
We start with the **domain name,** “[www.reddit.com](https://www.reddit.com)”. This is broken into three parts, which are read right-to-left. “.com” is called the **top level domain (TLD)**. “reddit” is called the **domain name**, and “www” is called the **subdomain**. If you leave it out and just type “[reddit.com](https://reddit.com)” it is usually the same as typing “[www.reddit.com](https://www.reddit.com)”. In other words, “www” is a default subdomain.
Converting a domain name to an IP address happens through the **Domain Name Service (DNS)**. For your computer to get the reddit website, first a request gets sent to the .com DNS server, which returns the IP address of the “[reddit.com](https://reddit.com)” DNS server. Then a request to the “[reddit.com](https://reddit.com)” DNS server returns the IP address of the “[www.reddit.com](https://www.reddit.com)” server. Luckily these values don’t change much, so your computer keeps a copy of these values on your harddrive so the next time you visit reddit you don’t have to call DNS at all.
Once you get the IP address, now you need to know what **protocol** to use. Communications protocols are sort of analogous to human languages. “What language do I need to speak to get this information?” In the case of websites there are two protocols used most commonly: HTTP and HTTPS. HTTP basically is the “language of the web”. If you have a website and want to display web pages, your server needs to speak HTTP. HTTPS is an encrypted version of HTTP for security purposes. Email uses protocols called SMTP and POP3. File transfers may use protocols like FTP, SFTP or UNC. You may also see protocols like TCP, AMQP, etc. There are a lot of them. So that part at the beginning of the url tells the protocol your request is using.
Finally you get to the **Path**. Everything to the right of the domain name “/r/explainlikeimfive” is the path. This is the thing that we are requesting from the server. The server is free to interpret this path information however it wants, so basically on every website you just have to follow the rules of that site. Hyperlinks give information about which paths in a system are (probably) legit.
So when you type [http://www.reddit.com/r/explainlikeimfive](http://www.reddit.com/r/explainlikeimfive) into your browser, the following things happen:
1. DNS asks the .com DNS server for the [reddit.com](https://reddit.com) address, and then asks the [reddit.com](https://reddit.com) DNS server for the IP address of [www.reddit.com](https://www.reddit.com)
2. Then your browser looks at the “http” to know which protocol to use to create the request
3. Then your browser creates an HTTP request message with the /r/explainlikeimfive path and sends this request to the [www.reddit.com](https://www.reddit.com) server
There’s a lot here, but it’s a deep and fascinating subject. I hope this helps scratch the surface for you.
.com is a Top Level Domain. Any Internet address ending with .com must be registered with a central authority responsible for .com addresses.
Other Top Level Domains are .gov (for US government agencies), .uk (for addresses in the United Kingdom), and .mil (for the US military). Splitting up the domains this way allows different entities to decide how to use their block off internet domain names.
Google.com is the internet domain registered to Google.
Www is *not* part of the publicly registered address. It is a name the site administrator picked for a machine or service at an internet site. On a small network, the admin might direct users to login to mail.website.com for email and www.website.com for the web site and these will actually go to different places. A lot of times, however, the administrator will just send everyone to website.com and let the protocol determine whether to go to email, website, or wherever.
back when computer makers and their main customer, the military, and educational sites were first getting linked up, it was simple method of organizing sites by their purpose/mission. And every byte counted so they need to make it short (8 character name.3) so you have [airbase.MIL](https://airbase.MIL) itary, computermaker.COMmercial Federal offices got .GOVernment,
and university.EDUcational and since there were budding communication hubs like the WELL, Compuserve and AOL they got the .NETwork and nonprofits got ORGanization.
Latest Answers