8

Possible Duplicate:
What’s the point in having “www” in a URL?

Why do we prepend our URLs with "www", isn't http:// enough? Its clearly not necessarily because it is omissible.

However there is a particular circumstance where the use of "www" breaks the URL, when there is a subdomain.

Almost everytime I tell a non technical person to go to a url like blog.stackoverflow.com they try to go to www.blog.stackoverflow.com because they think all URLs start with "www." and get confused when it doesn't work.

Is there a technical reason for the "www" or was it just invented for semantical reasons?

Is there anything being done to address this or is it considered a non issue?

JD Isaacks
  • 855
  • 5
  • 14
  • 24
  • 2
    This is definitely a non-issue, and I am frustrated by those that try to make it an issue. (I'm looking at you, WordPress.) How you configure your DNS records is your business, not someone else's. Yes, it is good to set the proper records so both non-www and www get you to your website, but remember that there are other services out there that end up on other common hostnames, as pointed out by Mark and Jakob. – Brad Jul 01 '11 at 13:30
  • 1
    Who is this "we"? [We do _not_ prepend our URLs with "www".](http://no-www.org/) [We really don't.](http://homepage.ntlworld.com./jonathan.deboynepollard/FGA/web-allowing-omission-of-www.html) [We even ask on ServerFault again and again and again how to set things up to omit the "www".](http://stackoverflow.com/search?q=non-www) – JdeBP Jul 01 '11 at 13:33
  • There was a campaign a few years ago to change www.yourdomainhere.com to web.yourdomainhere.com as it was a lot quicker to say. I think MIT were involved, either because they implemented this idea on their servers, or because they had come up with the proposal in the first place. – Rich Jul 01 '11 at 13:38
  • 2
    If you choose to use a bare domain, `example.com`, for serving web content, and set cookies on this domain instead of on `www.example.com`, then you've forced *all* sub-domains, *e.g.* `blog.example.com`, to be include these cookies. This becomes an issue if you want to serve static content from a separate server/sub-domain like `static.example.com`. In this case you would need to secure a *second* domain for hosting only static content. – jscott Jul 01 '11 at 13:41
  • That doesn't change the simple fact that "we" do not do what the question assumes that we do before asking us why we do it, jscott. – JdeBP Jul 01 '11 at 14:10
  • 1
    @JdeBP please don't take it personally, when I say WE I mean like when I say "WE drive cars" you may not drive a car, you might ride a bike, and I may not be talking about YOU, but still a lot of people drive cars and a lot of people use www. – JD Isaacks Jul 01 '11 at 14:16
  • 1
    Whoever said anything about personal? Did you not get that all of those people coming to ServerFault that I pointed to (amongst others) are _not me_? I assert that it isn't even "a lot of people" who do what you describe in the question. Heck, WWW browsers have for a long time had [a search path mechanism to try to cope with the many people who leave the "www" off](http://www-archive.mozilla.org/docs/end-user/domain-guessing.html). – JdeBP Jul 01 '11 at 14:48

2 Answers2

10

The "best practice" for internet services was to use ALIASes named after roles. So you pointed people to "www.yourdomain.xyz" for web, "ftp.yourdomain.xyz", and so on even if you only had one giant computer running the entire place.

The gain was when you got a second, giant computer you could split up the roles and no one would have to change any links or configurations.

You just live in a world where 99.99% of the domains are used strictly for websites. Pointing the core domain name to a cruddy, "probably faddish and never going to amount to anything", webserver rather than a key DNS or directory authentication machine was SHEER MADNESS once upon a time. ;-)

Nothing is being done to address it except recommend that people alias www.you.blog.xyz to you.blog.xyz so that it doesn't cause issues for people who expect it. Heck, if you are using the domain for a single service on a single machine/cloud I recommend you alias *.you.domain.xyz so that ANYTHING works, even "thisshouldntwork.you.blog.xyz".

Mark
  • 2,248
  • 12
  • 15
2

'www' is just one kind of service, of which there may be many running on any given domain. But the domain itself can only point to one* server.

Today it's a very common service, but at the time the standard (well, practice) was minted there was no real reason to assume HTTP would be used rather than, say, Gopher.

A better solution would have been for the web browser to look for SRV records from the start, but now it's kind of too late to change.

*) Yes, you can have several A records and so on, but they better be indistinguishable from a user point of view.

Jakob Borg
  • 1,453
  • 1
  • 10
  • 13
  • 2
    It's not too late to change. The way that `SRV` records are specified to be used, after all, is to fall back to the old (i.e. current) service location behaviour in the absence of `SRV` resource records. [The shameful truth is that in fact there is **no** reason for **not** bringing WWW browsers into the 21st century.](http://homepage.ntlworld.com./jonathan.deboynepollard/FGA/dns-srv-record-use-by-clients.html#Shame) All of the technical issues were solved years ago. – JdeBP Jul 01 '11 at 14:00