View Full Version : website addressing - why are some www and others not?
eSDee
10-25-2004, 11:54 AM
A friend asked me this question recently and I realized that I don't really know the answer. Why are some websites required to have www in front of them while others, if you type in their address after the http://, will work without the www? Some websites will work even if they are www, and you don't put in the www. Others, if you put www in front of them will not load. Why is that?
Dman33
10-25-2004, 12:18 PM
A friend asked me this question recently and I realized that I don't really know the answer. Why are some websites required to have www in front of them while others, if you type in their address after the http://, will work without the www? Some websites will work even if they are www, and you don't put in the www. Others, if you put www in front of them will not load. Why is that?
I could be wrong but as long as the http:// (protocol part) of the URL is there, the www. and whatnot is all host headers on the web server itself. You see, the request goes to the web server and it decides what to do with the request. For example, I can tell my IIS server that Dman33.com goes to my default website. On the same server, I also have host headers for www.Dman33.com, webmail.Dman33.com, images.Dman33.com and so on. The web server will look at the header (blank, www, webmail, images etc..) and push the content as appropriate.
So the www. is not require, but is default. You can also set the http://<domainname>.com to be the default as well.
Hope I am right. :)
NOTE: dman33.com is not owned by me and does not exist AFAIK.
Jeffbx
10-25-2004, 12:37 PM
It's all a function of how DNS is set up. 'www' is an 'a' or address name for web pages, but it certainly not required unless DNS specifies it.
For example, you can own a domain, XYZ.com. Your webpage can be set up like:
xyz.com www a 10.10.10.1
xyz.com a 10.10.10.1
xyz.com mail mx 10.10.10.2
xyz.com chat a 10.10.10.3
In this case, http://www.xyz.com and http://xyz.com both point to the same server. However, you can also leave out either of those 2 addresses.
If the www record is omitted, then ONLY http://xyz.com would take you to the home page. If the blank (no header) line was omitted, then ONLY http://www.xyz.com would take you to the home page.
Dman33
10-25-2004, 12:41 PM
It's all a function of how DNS is set up. 'www' is an 'a' or addredd name for web pages, but it certainly not required unless DNS specifies it.
For example, you can own a domain, XYZ.com. Your webpage can be set up like:
xyz.com www a 10.10.10.1
xyz.com a 10.10.10.1
xyz.com mail mx 10.10.10.2
xyz.com chat a 10.10.10.3
In this case, http://www.xyz.com and http://xyz.com both point to the same server. However, you can also leave out either of those 2 addresses.
If the www record is omitted, then ONLY http://xyz.com would take you to the home page. If the blank (no header) line was omitted, then ONLY http://www.xyz.com would take you to the home page.
Bingo! I forgot the DNS part and was just explaining how IIS would then take the host header and direct appropriately. Thanks!
GilbertsGrape
10-25-2004, 03:04 PM
so why does
http://www.kyvu.org
go to the webpage and
http://kyvu.org/
will not go to the webpage????
Dman33
10-25-2004, 03:34 PM
so why does
http://www.kyvu.org
go to the webpage and
http://kyvu.org/
will not go to the webpage????
As jeffbx explained, the DNS entry
kyvu.org www a 216.234.48.65
exists because www.kyvu.org comes up. On the other hand,
kyvu.org a 216.234.48.65
does not exist in the DNS zone record for the domain so your computer cannot resolve this to an address. If that line were added to the zone record for the domain, http://kyvu.com would start working. (Config on the webserver may be required, but it depends.)
eSDee
10-25-2004, 04:14 PM
Thanks fellas :cheers:
Jcranmer
10-25-2004, 04:22 PM
Yep what they said up there.
WWW. is more a naming convention then anything. What really matters is the http:// tells the broswer to connect to port 80 and expect http content. Most of the time sites are setup through DNS to connect to the same content no matter if the www. is there or not. But this is not always the case.
Jeffbx
10-26-2004, 04:07 AM
Right - it's smart to set up your site both ways, but some people leave one or the other entry out for some reason.
Technically, you can put whatever you want after the http:// - you can name your site http://xyz.xyz.com, and it'll resolve properly as long as DNS is set up the right way.
Another fun thing is you can also use DNS to direct phony names to real sites - I remember a few years ago someone set up the DNS entry for www.linuxsucks.com to redirect to Microsoft.com. Oddly, MS didn't make it a big priority to get that corrected right away.
Powered by vBulletin® Version 4.1.12 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.