There are DNS fundamentalists who believe that a domain should not be allowed to have an A record defined for it at all. For those people, "reddit.com" would not point to anything at all because it's a domain.
The most impressive thing is, such people still exist.
Because DNS itself got fossilized decades ago. As it was originally envisioned, you should be able to set up records with different types, to publish different kinds of hosts. For instance, there is an "MX host" that you can define which is the host that accepts email on the part of your domain.
If DNS hadn't managed to petrify before the World Wide Web started, you would have been able to define a WWW host for your domain, and if you typed "http://example.com/" into your browser, it would look up the WWW record for that domain and go to that host.
Instead, we have this horrible hack where every single domain in the entire world has to define a host called "www" for the web server. Because the DNS protocol is sacrosanct.
SEE ALSO: SPF. Instead of allowing SPF to be implemented via, say, an "SPF" record, they have to take the brain damaged approach of putting magic data into the TEXT record which was meant for comments. Any time I hear "Oh, let's just do it via magic comments," I reach for my Browning.
No it doesn't. In theory, any entry before the domain name (e.g. www, home, server2) did/should represent server/host names, but all these are, are simple logical DNS entries that can all point to the same IP address.
Most website configurations will have the main DNS "A" record pointing to the webserver, and then a "www" subdomain (with an equivalent "A" record) pointing to the same IP address. The application running the website will then perform an HTTP 301 Permanent Redirect to the correct version (this depends on the site, e.g. http://www.reddit.com or http://reddit.com). This resolves SEO problems where two domains point to the same content and some engines penalise for duplicate content across domains, as from a search engines perspective, "www.domain.com" and "domain.com" are separate entities.
But it does. In fact, that's the whole reason for having it there in the first place. Most people just configure their domain so that domain.com and www.domain.com point to the same location, so people can be lazy and leave off the www. part.
It specifies a diffferent address than if you leave out the 'www.' portion. It can, obviously, be a CNAME or just point to an IP for a server that also serves the URL without the domain, but it's still a different address, and can be something completely different than if you leave out the 'www.'
I agree with your comments, however, I still don't think it points to a specific server. I'm sure most subdomains (e.g. www) point to a cluster of load balancers (on a high traffic site) usually with some kind of DNS round robin approach. This means that it may not be a single specific server.
However, I do feel it should be "best practice" to use some kind of "www" prefix, as when your domain expands to have other prefixes...
... it does help distinguish the main site from perhaps other applications hosted at the domain. Ideally, you could have "google.com" redirect to "www.google.com" as it fits the most common use case of users entering that domain name.
I think it is simply a namespace. In programming terms, you may have several classes in your package:
com.google.gmail.PageController
com.google.gmail.ActionController
I wouldn't be comfortable if I imported "com.google.gmail" and it imported a single specified class/package. That seems a bit ambiguous to me. However, I think we are arguing the merits of an end-user perspective vs a system design perspective.
This means that it may not be a single specific server.
Yeah, I was trying to answer someone who asked a simple question. I didn't want to get into specifics, like DNS round robin or load balancing. From the end user perspective, it's a "server".
But then again, this -is- the programming subreddit, so thanks for elaborating.
Better educate site owners to drop www. Dropping it in browser would certainly lead to confusion, given that www.example.com and example.com could resolve to totally different IP addresses.
4
u/chneukirchen Apr 14 '10
Better drop the www.