# Leading "www." on only some web addresses?

**URL:** https://boards.straightdope.com/t/leading-www-on-only-some-web-addresses/154540
**Category:** Factual Questions
**Created:** [February 12, 2003, 7:35am UTC](https://boards.straightdope.com/t/leading-www-on-only-some-web-addresses/154540 "2003-02-12T07:35:37Z")
**Posts on this page:** 13
**Page:** 1

<div class="post-metadata">

### Author: ![capnfutile](https://avatars.discourse-cdn.com/v4/letter/c/e0b2c6/32.png) [@capnfutile](https://boards.straightdope.com/u/capnfutile)
#### Post date: [February 12, 2003, 7:35am UTC](https://boards.straightdope.com/t/leading-www-on-only-some-web-addresses/154540/1 "2003-02-12T07:35:37Z")

</div>

How come I can type, say, “[foo.com](http://foo.com)” into my browser bar and get to [www.foo.com](http://www.foo.com) but if I try it for “[fark.com](http://fark.com)” the name doesn’t resolve and I have to type in the “www.” before it’ll work? Is this down to which DNS server I happen to be going through? How and where the domain name was registered? Celestial alignment? Browser type?

Capn

---

<div class="post-metadata">

### Author: ![II\_Gyan\_II](https://avatars.discourse-cdn.com/v4/letter/i/bbe5ce/32.png) [@II\_Gyan\_II](https://boards.straightdope.com/u/II_Gyan_II)
#### Post date: [February 12, 2003, 7:45am UTC](https://boards.straightdope.com/t/leading-www-on-only-some-web-addresses/154540/2 "2003-02-12T07:45:08Z")

</div>

> [@](#):
>
> \*Originally posted by capnfutile \*  
> \*\*How come I can type, say, “[foo.com](http://foo.com)” into my browser bar and get to [www.foo.com](http://www.foo.com) but if I try it for “[fark.com](http://fark.com)” the name doesn’t resolve and I have to type in the “www.” before it’ll work? Is this down to which DNS server I happen to be going through? How and where the domain name was registered? Celestial alignment? Browser type?
> 
> Capn \*\*

There’s a server at [foo.com](http://foo.com) that probably redirects requests on port 80 to [www.foo.com](http://www.foo.com), but not at Fark.

However, some browsers also tend to try [www.foo.com](http://www.foo.com) after [foo.com](http://foo.com) doesn’t get a proper HTTP response. But, yours isn’t like that.

---

<div class="post-metadata">

### Author: ![Zagadka](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/zagadka/32/7272_2.png) [@Zagadka](https://boards.straightdope.com/u/Zagadka)
#### Post date: [February 12, 2003, 7:48am UTC](https://boards.straightdope.com/t/leading-www-on-only-some-web-addresses/154540/3 "2003-02-12T07:48:27Z")

</div>

It depends how the site has the DNS and servers set up. You can have \*.site.com set to direct to [www.site.com](http://www.site.com), with certain exceptions ([mail.site.com](http://mail.site.com), [forums.site.com](http://forums.site.com), whatever).

For Fark, I think Drew just spilled too much beer down his throat on registering. 😉

---

<div class="post-metadata">

### Author: ![Urban\_Ranger](https://avatars.discourse-cdn.com/v4/letter/u/e9c0ed/32.png) [@Urban\_Ranger](https://boards.straightdope.com/u/Urban_Ranger)
#### Post date: [February 12, 2003, 9:07am UTC](https://boards.straightdope.com/t/leading-www-on-only-some-web-addresses/154540/4 "2003-02-12T09:07:44Z")

</div>

There’s nothing sacred about the “www” prefix, however, it is a very commonly used convention to denote http servers. You can have http servers without the prefix - you can call them anything you want, as long as you have [foo.com](http://foo.com) in the domain registry.

---

<div class="post-metadata">

### Author: ![Balthisar](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/balthisar/32/2825_2.png) [@Balthisar](https://boards.straightdope.com/u/Balthisar)
#### Post date: [February 12, 2003, 11:46am UTC](https://boards.straightdope.com/t/leading-www-on-only-some-web-addresses/154540/5 "2003-02-12T11:46:47Z")

</div>

The “www” prefix isn’t really a meaningless prefix in host name resolution. Simply put “host name resolution” means finding a computer on the internet to talk to. A host is an internet domain, again, some place on the internet. We have “top level domains” such as .org, .net, or .com. Whenever you type an address into your web browser or FTP program (let’s say [www.mydomain.com](http://www.mydomain.com)), it consults a DNS server to see where it lives, what its IP address is. In theory it first consults a root DNS server to see where .com lives. The .com server finds out (“resolves”) the address for “mydomain” – “mydomain” is called the machine name, and is “your” machine and strictly speaking refers to your own DNS server. The “mydomain” server then does its own DNS search to see where “www” lives – www is a subdomain, of which you can have many. Again, in theory subdomains originally were separate IP addresses, but all types of local virtual DNS exist that allow you to have separate subdomains on a single IP address – Apache et al take care of the details. This gives a single domain – such as [straightdope.com](http://straightdope.com) – to have .www, .boards, .ftp, and so on as subdomains.

Soooo… the reason some sites require the www subdomain instead of just the machine name is because they’re configured that way.

---

<div class="post-metadata">

### Author: ![critter42](https://avatars.discourse-cdn.com/v4/letter/c/7ba0ec/32.png) [@critter42](https://boards.straightdope.com/u/critter42)
#### Post date: [February 12, 2003, 1:02pm UTC](https://boards.straightdope.com/t/leading-www-on-only-some-web-addresses/154540/6 "2003-02-12T13:02:04Z")

</div>

Then of course it can work the other way. If you type in “[www.slashdot.org](http://www.slashdot.org)”, it will resolve to [http://slashdot.org](http://slashdot.org)

critter42

---

<div class="post-metadata">

### Author: ![Cliffy](https://avatars.discourse-cdn.com/v4/letter/c/59ef9b/32.png) [@Cliffy](https://boards.straightdope.com/u/Cliffy)
#### Post date: [February 12, 2003, 2:57pm UTC](https://boards.straightdope.com/t/leading-www-on-only-some-web-addresses/154540/7 "2003-02-12T14:57:09Z")

</div>

Correct me if I’m wrong, but the presence of “www” at the beginning of most web addresses is a convention that evolved about a decade ago, when the web was brand new, to distinguish web pages from, say, ftp sites, which were at that time much more common.

–Cliffy

---

<div class="post-metadata">

### Author: ![micco](https://avatars.discourse-cdn.com/v4/letter/m/5f8ce5/32.png) [@micco](https://boards.straightdope.com/u/micco)
#### Post date: [February 12, 2003, 3:11pm UTC](https://boards.straightdope.com/t/leading-www-on-only-some-web-addresses/154540/8 "2003-02-12T15:11:02Z")

</div>

> [@](#):
>
> \*Originally posted by Cliffy \*  
> **Correct me if I’m wrong, but the presence of “www” at the beginning of most web addresses is a convention that evolved about a decade ago, when the web was brand new, to distinguish web pages from, say, ftp sites, which were at that time much more common.**

That’s correct. According to convention, a company would register a second-level domain name like [mycompany.com](http://mycompany.com) and then set up separate addresses for “www” for HTTP, “mail” or “smpt” for SMTP, “ftp” for FTP, etc. These might or might not be set up on the same physical server, and they might or might not resolve to the same IP, but they would typically be set up according to this naming convention so no one had to guess where your public FTP server was or where your web server was. AFAIK, this was just a convention rather than a published standard or RFC, and there were plenty of hosts that ignored it for one reason or other.

In many cases the bare second-level domain name would be set up to automatically resolve to the correct server based on protocol. That means if you hit port 80 on [mydomain.com](http://mydomain.com), it redirects to [www.mydomain.com](http://www.mydomain.com). If you hit port 25, it redirects to [smtp.mydomain.com](http://smtp.mydomain.com), etc. for other standard protocol port addresses. Of course, if you set up all your services on one box, you can just call that box [mydomain.com](http://mydomain.com) and the ports don’t even have to redirect.

---

<div class="post-metadata">

### Author: ![handy](https://avatars.discourse-cdn.com/v4/letter/h/b5a626/32.png) [@handy](https://boards.straightdope.com/u/handy)
#### Post date: [February 12, 2003, 4:20pm UTC](https://boards.straightdope.com/t/leading-www-on-only-some-web-addresses/154540/9 "2003-02-12T16:20:40Z")

</div>

Yep, it depends how it’s set up when you register it. Some registers provide that a short URL works, which is nice cause it looks better in ads. Ever try just putting ‘foo’ as an address?

---

<div class="post-metadata">

### Author: ![Joe\_Cool](https://avatars.discourse-cdn.com/v4/letter/j/ecb155/32.png) [@Joe\_Cool](https://boards.straightdope.com/u/Joe_Cool)
#### Post date: [February 12, 2003, 4:26pm UTC](https://boards.straightdope.com/t/leading-www-on-only-some-web-addresses/154540/10 "2003-02-12T16:26:16Z")

</div>

Minor nitpick:

www is the machine name, not a subdomain.  
In the name www.cs.foo.edu, .edu is the top level domain, foo is the domain name, cs is the subdomain, and www is the host name. In www.foo.edu, there is no subdomain. Just a TLD, domain name, and host name.

---

<div class="post-metadata">

### Author: ![micco](https://avatars.discourse-cdn.com/v4/letter/m/5f8ce5/32.png) [@micco](https://boards.straightdope.com/u/micco)
#### Post date: [February 12, 2003, 4:36pm UTC](https://boards.straightdope.com/t/leading-www-on-only-some-web-addresses/154540/11 "2003-02-12T16:36:56Z")

</div>

> [@](#):
>
> \*Originally posted by handy \*  
> \*\*Yep, it depends how it’s set up when you register it. Some registers provide that a short URL works, which is nice cause it looks better in ads. Ever try just putting ‘foo’ as an address? \*\*

Nope, that’s not the role of a registry. A registry only takes a second-level domain name and associates it with an authoritative DSN server(s). So when I need an IP for [www.mydomain.com](http://www.mydomain.com), I query the COM root server to get the authoritative DNS for the mydomain registration and then query that DNS server for the IP I need. Of course, in practice it’s a little more complicated because the DNS servers between mine and the root may cache results and my query may never have to go all the way up the tree, but that’s the gist.

Distinquishing between [www.mydomain.com](http://www.mydomain.com), [ftp.mydomain.com](http://ftp.mydomain.com), and [t3.s2.g1.mydomain.com](http://t3.s2.g1.mydomain.com) is the job of the local DNS and routing tables. The registrars aren’t going to keep track of that since they only care about the information needed to populate the root servers. Some registries which also provide hosting or domain forwarding may be providing the subdomain and machine-level routing functions too, but don’t confuse them with the actual registry tasks.

---

<div class="post-metadata">

### Author: ![aahala](https://avatars.discourse-cdn.com/v4/letter/a/a88e4f/32.png) [@aahala](https://boards.straightdope.com/u/aahala)
#### Post date: [February 12, 2003, 4:39pm UTC](https://boards.straightdope.com/t/leading-www-on-only-some-web-addresses/154540/12 "2003-02-12T16:39:24Z")

</div>

When I first noticed the internet in 1997 or so, the TV announcers would emphasize “W” “W” “W”. That practice has since declined.

It’s hard to teach an old dog new tricks, so I like to see the www even though I know it’s largely unnecessary.

---

<div class="post-metadata">

### Author: ![TWDuke](https://avatars.discourse-cdn.com/v4/letter/t/e495f1/32.png) [@TWDuke](https://boards.straightdope.com/u/TWDuke)
#### Post date: [February 12, 2003, 4:48pm UTC](https://boards.straightdope.com/t/leading-www-on-only-some-web-addresses/154540/13 "2003-02-12T16:48:23Z")

</div>

Heck, don’t you remember “H-T-T-P-backslash… I mean, colon-backslash-back… no, forward…”?
