The Schpat Dope

Just like The Striaght Dope only not as well researched or funny

Friday, August 19, 2005

What's up with the 'www'

Groundy asks:

I've noticed that some websites can be access both with the www prefix and without. Like http://schpatdope.blogspot.com/ or http://www.schpatdope.blogspot.com/ (which do you prefer?) Some sites force the www, and others force the lack of it. Some just flat don't work. What gives?

Schpat:

The answer is magical, mystical, internet fairy dust. Not buying it? Ok, settle in and I'll try to explain.

When Dan Quale invented the internet, way back in 1983, the www prefix was intended to show what protocol the document or 'page' used. A protocol is like a translation template and lets your computer know what to expect and how to read it. There are a number of internet protocols, or technically 'application level protocols' in the 'internet protocol suite'. Among them are HTTP, SMTP, SSH, POP3, IMAP, IRC, and FTP. If a user knew what protocol to use they would know what application would need to be used to access the information. So for instance a domain with the prefix 'mail' would use the 'SMTP' protocol and the user would know to use 'PegasusMail' to access it.

These days most application level protocols have been largely integrated into single applications such as Internet Explorer or Fire Fox. On windows machines the registry contains entries for prefixes that let these application know what protocol to use. This functionality is often abused by malicious adware to impose pop-up advertising on internet users. This practice is called browser hi-jacking.

Part of your question was that sometimes you can access a website without using the 'www' prefix, well that's because your browser is cleaver. You should actually be able to access any page that requires a 'www' without actually typing it in because if your browser does not find a page with no prefix specified it automatically tries the same page but with the default 'www'.

As to why certain domains require no prefix here's some more background: A domain name consists of three parts: the Top Level Domain, the Second Level Domain and the Prefix. The 'top level domain', or TLD, is the last part of the domain name, examples include '.com', '.org', '.net', and '.co.za'. The TLD lets your browser know where to start looking for the 'Domain Name Server', or DNS, that will eventually tell it what the IP (internet Protocol) address of the server that hosts the domain is, a DNS is a giant look-up table. Then there is the Second Level Domain, 'SLD'. The SLD is the part between the prefix and the TLD and can be made up of any number of clauses separated by 'dots'. The SLD and TLD together make up the Zone. When you register a domain name you are actually registering the zone, you can then run different applications on that zone by specifying the prefix. Most people default to 'www' for their public internet access prefix, as is dictated by standard, but some don't, 'www2' also sometimes seen. They could however just leave it off, if they do that a site name with the 'www' wont load.

So in short, when entering a URL you are more likely to get to the site if you leave off the 'www', but it will almost always take longer. I prefer to use the prefix because it's purer and lets users know exactly what to expect when typing in a URL. Domains that "just flat don't work" probably have been decommissioned or, probably due to inattentiveness, have a broken link in the DNS chain.

Mitsy says I should have just left it as magical, mystical, internet fairy dust, it's so much easier to understand. She likes internet fairies and asks me to remind you that every time you click on our sponsor's links, an internet fairy gets her wings.

2 Comments:

Blogger zenstar said...

a slight ammendment to your answer there schpat. once your browser get to the point of trying to resolve the www part it already knows the ip adress of the web server it is talking to and is asking the web server directly for its www section.
whether something is returned at this point or not is up to the web server. most people nowdays allow no www and just returns www as defualt. there should be no time difference between using www and not if this is the case.
your browser is smart and does try add the www if it can't get anything, but it really shouldn't have to. if it does the website you're trying to visit is not very well set up (i agree that most websites out there could be set up a lot better though.)

12:17 PM  
Blogger ork_khrist said...

Dear Schpat,
Why did clicking on these banner ads make me feal so dirty?

4:12 PM  

Post a Comment

<< Home