Results 1 to 9 of 9

Thread: website addressing - why are some www and others not?

  1. #1
    Old Skooler Numba 1 eSDee's Avatar
    Join Date
    Nov 2000
    Location
    Diego
    Posts
    10,065

    website addressing - why are some www and others not?

    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?
    ~~~~~~~~~~~~
    3 days ~ Willie Nelson

    3 days I dread to see arrive
    3 days I hate to be alive
    3 days filled with tears and sorrow
    yesterday today and tomorrow

  2. #2
    Lieutenant
    Join Date
    Oct 2000
    Location
    New York
    Posts
    324
    Quote Originally Posted by eSDeeLoco
    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.

  3. #3
    Fleet Admiral Jeffbx's Avatar
    Join Date
    Mar 2000
    Location
    Michigan
    Posts
    9,405
    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.

  4. #4
    Lieutenant
    Join Date
    Oct 2000
    Location
    New York
    Posts
    324
    Quote Originally Posted by Jeffbx
    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!

  5. #5
    Captain GilbertsGrape's Avatar
    Join Date
    Sep 2000
    Location
    You can’t get there from here, USA
    Posts
    1,802
    so why does

    http://www.kyvu.org

    go to the webpage and

    http://kyvu.org/

    will not go to the webpage????

  6. #6
    Lieutenant
    Join Date
    Oct 2000
    Location
    New York
    Posts
    324
    Quote Originally Posted by GilbertsGrape
    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.)

  7. #7
    Old Skooler Numba 1 eSDee's Avatar
    Join Date
    Nov 2000
    Location
    Diego
    Posts
    10,065
    Thanks fellas
    ~~~~~~~~~~~~
    3 days ~ Willie Nelson

    3 days I dread to see arrive
    3 days I hate to be alive
    3 days filled with tears and sorrow
    yesterday today and tomorrow

  8. #8
    Commander Jcranmer's Avatar
    Join Date
    Jan 2001
    Location
    Pekin, IN
    Posts
    1,377
    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.

  9. #9
    Fleet Admiral Jeffbx's Avatar
    Join Date
    Mar 2000
    Location
    Michigan
    Posts
    9,405
    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.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •