Is the www in web addresses a subdomain?

8

3

Possible Duplicate:
Whats the purpose of the WWW subdomain?

I read about sub domains at w3schools, but Wikipedia says something different. The w3schools gave the example of www being a sub domain. Is the www before the website the subdomain or the subaddress inside a domain (as wikipedia mentioned)?

user46959

Posted 2010-11-26T07:22:19.247

Reputation:

Question was closed 2010-11-26T18:31:34.693

Answers

9

To add to that the reason many sites use the www. subdomain is that it allows for simple segregation in the file structure of the site. Everything in the www folder (and at the www.example.com domain) is directly related to serving the site to the public. This allows for simple root level site organization so you could also have a dev folder and have a subdomain dev.example.com for your development site, and so on.

Now you not only know that it is in fact a subdomain, but also why.

David Maguire

Posted 2010-11-26T07:22:19.247

Reputation: 106

So why http://no-www.org/?

– None – 2010-11-26T10:37:11.127

@farad: Don't listen to that fringe-group site. There are many reasons to continue using www, and no meaningful reason not to. For example, in advertising, a web address is much clearer to most people when it begins with www. – paradroid – 2010-11-26T10:51:35.023

1why doesnt this site uses www then? – None – 2010-11-26T11:09:45.627

@fahad: Because they probably felt like they didn't need it. It's a choice, but evangelising not using www seems stupid, as there are many sites that would want to use a domain name for different hosts and protocols. – paradroid – 2010-11-26T11:20:43.570

I never knew this. I always imagined the domain was part of the www, not the other way around. It is like there are gazillions of www's, not one. Weird. – Benjamin – 2013-03-29T20:04:21.517

given that no-www started in 2002-2003ish, their goal is pretty reasonable: "Our ideal scene is one where non-specialized sites accept traffic on the www host name, but silently redirect it to the bare domain name." ... "We understand that this sort of configuration is not appropriate for every website. For example, a domain may require the webserver to be stored on a different machine than the domain root server. However, relatively few sites are built with this sort of architecture." – xhainingx – 2013-07-24T18:07:04.087

6

Both articles are saying exactly the same thing.

example.com -> domain
foo.example.com -> subdomain

The foo is inseparable from the rest of the hostname (except when dealing with search domains, but that's a completely different topic).

Ignacio Vazquez-Abrams

Posted 2010-11-26T07:22:19.247

Reputation: 100 516

and what about the www being a subdomain? – None – 2010-11-26T07:42:01.513

1Have you read my answer? – Ignacio Vazquez-Abrams – 2010-11-26T07:45:31.140

1@fahad, yes, www is a subdomain as well. So, for the site www.example.com, www is the subdomain of the domain example.com. – nhinkle – 2010-11-26T08:00:43.553

2www is also a hostname, whereas subdomains are not always hostnames, as they are not the same thing, but www is always a hostname. – paradroid – 2010-11-26T10:37:01.080

@Ignacio : I did not understood the foo in your answer – None – 2010-11-26T10:38:57.567

@fahad - Ignacio was using 'foo' in the same manner as 'example'. It's three gibberish characters (because there is not a good three-character word for 'example' in English!) and this is fairly common usage. It could just as easily have been 'hypothetical.example.com' – Shinrai – 2010-11-26T15:22:10.373

1

A sub domain normally denotes separate content from the main website.

For example, if I go to foo.bar.com, I expect a different set of content from bar.com.

The www prefix is subtly different to a sub-domain. This is actually a canonical alias that normally points to the same content as the non www prefix.

So in real-world terms, "www" is not really a sub-domain as it does not contain a "sub section" of the website. Here are some examples...

www.bar.com or bar.com - the root of the website foo.bar.com - a sub-domain of the website

Part Two... should you use "www" prefix?

The answer to this question is "it depends". If your audience is the "general public", you'll find that they are more comfortable starting a web address with www. If you are dealing with savvy technical types, you can ommit the www - so you'll find Stack Overflow, Super User, jQuery and many other websites with technical audiences using the non-www address as their preferred URL. Also note, though, that if you type in the www by accident, you still get to the same page!

In short, "www" isn't really a sub-domain, it's an alias and you should use it if it is appropriate to your audience.

If you are thinking about this kind of stuff, you might find the W3C Style Guidelines a useful read!

http://www.w3.org/Provider/Style/

Fenton

Posted 2010-11-26T07:22:19.247

Reputation: 194

@Sohnee this is not a "canonical alias" -- it is very possible that domain.com is not accessible on the internet and is used only on the internal network (and functions completely different than www.domain.com), whereas www.domain.com is the public website. While most site's forward www traffic to the primary domain, this is not a guarantee or standard. It may be a convention, but it is NOT an alias. – Charles Addis – 2016-10-11T18:36:08.037

4Technically, www. certainly is a subdomain. On many sites, it's an exact copy of the bare domain, but this is not necessarily the case. – TRiG – 2010-11-26T15:49:56.757

1+1 for canonical aliases! This is correct in a lot of standard usage cases and clears up the fact that you don't "need" a subdomain to serve at www. – David Maguire – 2010-11-27T04:51:53.597