www.webdeveloper.com
Page 1 of 2 12 LastLast
Results 1 to 15 of 24

Thread: what is the difference between "www" and "www1"

  1. #1
    Join Date
    Jul 2005
    Posts
    32

    what is the difference between "www" and "www1"

    Hello everybody,

    what is the difference between "www" and "www1" or "www2" in Domain Names?

    Examples:
    www.domainname.com
    www1.domainname.com

  2. #2
    Join Date
    Mar 2005
    Location
    Sydney, Australia
    Posts
    7,974
    They have multiple web servers so they called them www1, www2, etc because you can't set up multiple web servers on the same domain name and name them all www because then there would be no way to tell which server to access.
    Stephen

  3. #3
    Join Date
    Jan 2005
    Location
    Alicante (Spain)
    Posts
    7,739
    Quote Originally Posted by felgall
    you can't set up multiple web servers on the same domain name and name them all www
    Of course you can; it's called load balancing.

    www, www1, and www2 are all subdomains. Most sites through legacy use www as the default website rather than or as well as just the domain itself. Also it is quite possible to have different sites on www.domain.com and domain.com

  4. #4
    Join Date
    Mar 2005
    Location
    Sydney, Australia
    Posts
    7,974
    www,www1, and www2 are not sub domains - they are machine names and identify which computer to access. If you don't specify a machine name then the default computer is accessed. Sub-domain names follow the machine names in URLs.

    The complete format for URLs is:

    http://userid:password@machinename.s...yname/filename

    It would be extremely rare to include all of them when typing one in thouigh - in most cases you allow some to default.
    Stephen

  5. #5
    Join Date
    Jan 2005
    Location
    Alicante (Spain)
    Posts
    7,739
    Quote Originally Posted by felgall
    www,www1, and www2
    They are not domains so therefore they must be subdomains. Anything that prefixes the domain an that is separated from it by a dot is a subdomain. Also www. is not default, it just so happens that many people use the www. subdomain for legacy reasons.
    Last edited by bokeh; 04-06-2006 at 03:53 PM.

  6. #6
    Join Date
    Jan 2005
    Location
    Alicante (Spain)
    Posts
    7,739
    Further! According to RFC882:
    "A domain is identified by a domain name, and consists of that part
    of the domain name space that is at or below the domain name which
    specifies the domain. A domain is a subdomain of another domain
    if it is contained within that domain. This relationship can be
    tested by seeing if the subdomain's name has the containing
    domain's name as the right part of its name. For example, A.B.C.D
    is a subdomain of B.C.D, C.D, D, and " ". Potentially, each node
    or leaf on the tree can create new subdomains ad infinitum.
    "
    Last edited by bokeh; 04-06-2006 at 04:20 PM.

  7. #7
    Join Date
    Jul 2005
    Posts
    32

  8. #8
    Join Date
    Aug 2004
    Location
    Ankh-Morpork
    Posts
    19,322
    The subdomain points the request to a particular document root directory. Whether that directory is on the same server as the other subdomains of that domain or on a separate piece of hardware is completely at the option of the network administrators, and can be a combination of separate servers and/or separate (or same) directories on those servers. The network server(s) will have configuration settings that point each valid subdomain/domain request to the desired server and directory. A well-configured domain server will also have a configuration which points requests to a default subdomain if none is provided. (As noted above, it does not have to be called "www", it could be called "nogdog" if you wanted, but by convention "www" is usually the default subdomain.)
    "Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
    ~ Terry Pratchett in Nation

    eBookworm.us

  9. #9
    Join Date
    Mar 2005
    Location
    Sydney, Australia
    Posts
    7,974
    Once you get to the domain or sub-domain you can then have one or more computers hosting that domain or sub-domain. Each of these computers has a machine name and where there is only one the machine name of www is usually used. Where a machine name is left off of the front of the domain or sub-domain name the default machine name of www is usually assumed so that the person will still reach the right computer to access the site.

    When a site uses more than one computer for hosting then each computer needs to be given a different machine name and often www1, www2 etc are what gets used.

    Example: With my web site at http://www.felgall.com/ the top level domain is .com, my domain name is felgall, the machine name (which can be omitted) is www and it uses HyperText Transfer Protocol to access it. While I do have several sub-domains within my domain I do not have one called www and if I did then you would be able to access it at www.www.felgall.com.
    Stephen

  10. #10
    Join Date
    Jan 2005
    Location
    Alicante (Spain)
    Posts
    7,739
    Quote Originally Posted by felgall
    machine name
    I don't know where you are getting this term from. Everything to the left of a dot in a domain name is a sub domain, hence in http://felgall.com felgall is a subdomain of .com and in http://www.felgall.com www is a subdomain of felgall.com. .com is the toplevel domain and as such does not have it's own root directory.
    Quote Originally Posted by felgall
    Once you get to the domain or sub-domain you can then have one or more computers hosting that domain or sub-domain. Each of these computers has a machine name and where there is only one the machine name of www is usually used.
    This is just not true. In a typical virtual host www. is set up as an alias of its parent domain. Example virtual host:
    Code:
    <VirtualHost *:80>
        ServerName felgall.com
        ServerAlias www.felgall.com
        DocumentRoot /path/to/felgall.com/public_html
    </VirtualHost>
    The root directory can also be set as a wildcard of the domain so it processes all requests for that domain that the DNS has entries for. Example virtual host:
    Code:
    <VirtualHost *:80>
        ServerName felgall.com
        ServerAlias *.felgall.com
        DocumentRoot /path/to/felgall.com/public_html
    </VirtualHost>
    Quote Originally Posted by felgall
    the default machine name of www is usually assumed so that the person will still reach the right computer to access the site.
    Servers do not assume anything. They strictly follow programmed logic.
    Quote Originally Posted by felgall
    When a site uses more than one computer for hosting then each computer needs to be given a different machine name and often www1, www2 etc are what gets used.
    That is not true. For example www.google.com resolves to two IP addresses (66.249.87.104 and 66.249.87.99) and at each of those IPs there could be any number of individual servers all serving requests for the same domain name (www.google.com). If each machine had its own name how would the clients ever know which one to access?
    Quote Originally Posted by felgall
    While I do have several sub-domains within my domain I do not have one called www and if I did then you would be able to access it at www.www.felgall.com.
    If that sub domain did not exist the server would return a 404. What you really mean is you do not have a unique virtual host set up for www.felgall.com but instead it is an alias of another virtual host.
    Quote Originally Posted by felgall
    if I did then you would be able to access it at www.www.felgall.com.
    That is not true either. Each subdomain must either be explicitely listed in a virtual host or be the subject of a wildcard. If it is neither the server will either pass the request to the first virtual host (which is normally configured with an error message) or return a 404.
    Last edited by bokeh; 04-07-2006 at 04:32 AM.

  11. #11
    Join Date
    Mar 2005
    Location
    Sydney, Australia
    Posts
    7,974
    Not everything to the left of the dot is a subdomain name. The userid password and machine name are not subdomains and neither is the protocol.

    protocol://userid:password@machinename.subdomain.domain/path/filename

    with everything except protocol and domain being optional.


    Strict programming logic means that the default value for something is assumed to be the one you want to use if you don't specify something different. In this instance the Server Alias provides the default or assumed value.

    As to where I got the information - I have seen it in a number of different books that deal with how the URL and domain naming was designed to work - that is the specifications for defining the component parts of the URL. Our disagreement has probably come about due to the differences between the specification and the implementation of this part of the URL processing since the www that is supposed to represent the machine name is internally treated as an alias for the main domain.
    Last edited by felgall; 04-07-2006 at 05:08 AM.
    Stephen

  12. #12
    Join Date
    Jan 2005
    Location
    Alicante (Spain)
    Posts
    7,739
    Quote Originally Posted by felgall
    Not everything to the left of the dot is a subdomain name. The userid password and machine name are not subdomains and neither is the protocol.

    protocol://useridassword@machinename.subdomain.domain/path/filename
    Those are seperated from the domain name as a whole by a "@". Just to clarify my statement: every delimited group of characters not itself containing any delimiting characters and superceeded by a dot is a subdomain.

  13. #13
    Join Date
    Mar 2005
    Location
    Sydney, Australia
    Posts
    7,974
    The specifications state that the www is the machine name. That it is implemented as something else doesn't change what it is supposed to represent.
    Stephen

  14. #14
    Join Date
    Jan 2005
    Location
    Alicante (Spain)
    Posts
    7,739
    Quote Originally Posted by felgall
    The specifications state that the www is the machine name.
    I've done an extensive search but I can seem to find any reference to machinename/machine name used in this context. Nevertheless, since I'm sure everyone understands what we are talking about I don't see any need to debate that further.

    The www. is a moot point and this discussion about webservers is a distraction from its real reason for its existence. The domain name system (DNS) translates domain names into "A" records (IP addresses), either directly or using CNAMES or MX records. The problem is the protocol under which "A" records are served has no method to determine for which protocol the IP address will be used. That means for each protocol that needs to be served to a different unique IP we need to set up a subdomain. The reason this is necessary to know is because, for example the authoritative mailserver for a domain and its corresponding webserver may be located at different IP addresses. After splitting the requests into their various types with subdomains
    • www.domain.com
    • ftp.domain.com
    • irc.domain.com
    • mail.domain.com
    • etc.domain.com
    we are left with a decission: To what IP should requests for the parent domain itself be directed (if at all). Normally it is set up to point to the webserver IP negating the need of surfers to type in that pesky www. Also these days many sites use a 301 redirect from domain.com to www.domain.com or vice versa to improve the site's search engine ranking.
    Last edited by bokeh; 04-07-2006 at 06:00 AM.

  15. #15
    Join Date
    Apr 2005
    Location
    Hastings, Sussex, UK.
    Posts
    244
    You two are making my head spin. I reckon a fight would solve this.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles