As we all know, most websites can now be reached by simply typing in “whateverthenameofthesiteisdotcom.”
Occasionally though, I find I still have to type WWW. Now, it’s not a problem, really. It doesn’t take that much more time to type the w’s, but I’m just wondering why? Are those websites on older servers? Does the server have anything to do with how the site is recognized? I’m sure somebody out here has the answer.
Whoever controls the DNS record for the “whatever” domain has simply set the same IP address for “whateverdotcom” and “wwwdotwhateverdotcom”. You could add a host record for “photopatdotwhateverdotcom” and point it to a functioning web server and people would still be able to reach it with a browser. In other words, the “www” is irrelevant and is just put there by convention, it can be replaced by anything or simply left off if desired (by the DNS administrator for the domain in question). As long as the address you publish is the same as the DNS record, it will work.
Now, some web browsers have the “feature” to automatically prepend a “www.” if the typed address is not found, but that’s another story.
In the early days of the internet, the domain name foo.com, say, would be registered to a particular organisation, and different servers would then have different prefixes, e.g. FTP server at ftp.foo.com, mail server at mail.foo.com, WWW server at www.foo.com.
Nowadays, when we think “internet” we normally think “WWW”, so the www tends to be implied. Generally speaking, if you just type foo.com into your web browser, the browser is smart enough to add the “www.” part itself, if it needs to. In this way, foo.com will work even if the DNS entry for foo.com does not point to www.foo.com.
However, many sites (including this board), don’t have the www prefix. Try going to www.boards.straightdope.com and you’ll be SOOL.
www. is the name of the server on which the site is hosted.
Most domain.com addresses are set as default to www.domain.com, as explained. This is a convention. domain.com can be made to default to any other server as well.
It would be possible to default straightdope.com to boards.straightdope.com if the admins so desired. In this case, to reach the main homepage of straightdope.com you would have to prefix it with www. So the www. prefix is only a convention, and generally the primary server for a given domain.
addendum: sometimes prefix.domain.com is just a sub-domain pointer to a subdirectory on the same server, not necessarily a pointer to a different server. Not relevant to this discussion, but just incase my previous answer seemed misleading.
Remember, too … there used to be gopher.someserver.com, telnet.someserver.com, irc.someserver.com. Back in the good 'ol days, when the Web wasn’t so dominant, it was important to distinguish between the different services and protocols in a domain name.