Wednesday, November 17, 2004

How the Web Works: URLs and the Grocer

Let's continue with our cake building metaphor, and look at it from another perspective. If your mother is the web browser, laboriously and meticulously building a beautiful cake for your pleasure, the grocer is the web server, serving mothers everywhere with the cake mixes they need to fill your belly.

The web server's job is simple. It's a computer somewhere out there in internet land and it holds the files you want. For every file on the web, there is a Universal Resource Locater (URL), which does what you'd think. It describes exactly where that file is. Let's say, for instance, you are looking for the document that this one follows up. The URL for that file is:
http://geekblogthatnoonereads.blogspot.com/2004/11
/how-web-works-http-and-your-mother.html (url is broken onto two lines, so it will fit on the page.

The server here goes by the domain name: geekblogthatnoonereads.blogspot.com. What exactly does this mean? Well, there are three parts, separated by the period. From the right:

".com" is the domain suffix. Its was put there by the internet gods to help categorize domains. There is 'com' for commercial, 'net' for network, 'edu' for education, 'gov' for government, 'org' for organization, and others. .Com and .Net are kind of over used, in my opinion. Lots of people just choose .com when setting up their server because they are used to it. It is, in reality, not better or worse than .net, .info, .tv, or otherwise. In fact, sometimes, it's the wrong decision. If you are a non-profit organization, you should not choose a '.com' domain. You should choose '.org', to specify that your are an organization, not a commercial entity.

Anyway, the next part (from the right) is the domain. These domains can be purchased from registrars and can be owned by individuals or corporations, etc. The point is, they are owned and controlled by someone. So, when you go looking for 'google.com', the Domain Name Servers (DNS) act as the phone book for the internet and tell your computer exactly where to find google.com.

Finally, there is the subdomain, in our case, its 'geekblogthatnoonereads' but it could be anything like 'www', 'mail', or even left off entirely. The subdomain is exactly that. The main DNS servers will get you as far as 'blogspot.com', but it's up to the people at blogspot to get you where you really want to go.

So, to review. I own 'tunasoft.com'. If you go looking for it, one of the 12 world authorities will tell you where my server is. But if you want to get to 'www.tunasoft.com', you'll have to go to my server and ask for directions. It could be on that same server, or it could be on any other server in the world.


Ok, so we've reached the server. Let's talk about the rest of that URL: "/2004/11/how-web-works-http-and-your-mother.html". This is basically a description of a folder tree like on your own hard drive. To use our metaphor: isle 2004, shelf 11, and the box is labeled how-web-works...yadda yadda.

So that's pretty much it. You plunk that URL into that bar a the top of your browser. Your browser finds the server and asks for the file. The server grabs the file and sends it down to the browser.

It can get a bit more complicated. Some grocers will remember you. Some stores require a membership card to enter. But we can save those details for another article.


As always, questions and/or comments are requested and/or appreciated.

3 comments:

Anonymous said...

Great article! Thanks.

Anonymous said...

Thanks for interesting article.

Anonymous said...

Excellent website. Good work. Very useful. I will bookmark!