Okay, I wasn't paying much attention back at the very start
of the web (I was still using gopher and archie on a text
terminal for a while before I discovered that text-only
web browsers existed) so I may have missed a memo, but my
understanding of the "www." prefix on site names is this:

(Uh, if you just want the really short summary, skip down
to the part marked "The Really Short Summary".)

        Let's say you run a large site, maybe a university campus 
        or a large corporation, let's say "myexample.com",and 
        you've got a whole bunch of serious computers to admin.  
        Various deparments might each have their own minicomputer
        or at least their own fileserver, so you'll have
        personnel.myexample.com, strategic-planning.myexample.com,
        development.myexample.com, billing.myexample.com, and
        so on (some of which you probably don't want visible
        to the Internet at large, but that's beside the point.
        There may or not be a machine called simply "myexample.com".
        There doesn't have to be.  BUt let's say we've decided
        that certain central functions, such as email and any
        services we want accessible from the outside world, run
        on myexample.com.  That would include the company web
        server.  Visiting http://myexample.com/ will work as
        long as there's a machine named "myexample.com" and it
        has a web server program running on it.  Trying to 
        access ftp://myexample.com/ will work if an ftp server
        is running there.  mailto:[EMAIL PROTECTED] will
        work if there's a mail-transfer/delivery program running
        there *or* if the DNS (domain name service) records 
        specify some other machine to collect mail on myexample.com's
        behalf.

        Now let's say your company's popularity grows to the
        point that you think it'd make sense for mail, web, 
        and ftp services to run on separate machines, to spread
        the work out a bit and keep from having one computer    
        get bogged down.  You could name the three machines
        in question larry.myexample.com, curly.myexample.com,
        and moe.myexample.com, but it makes more sense to give
        them names other people will find easy to remember, 
        and maybe even easy to _guess_.  Such as naming them
        for their functions:  mail.myexample.com, ftp.myexample.com,
        and www.myexample.com.  (Or w3.myexample.com, or even
        web.myexample.com, but you don't see those as often
        any more.)  In fact, there's better than even odds that
        your ISP has machines named "mail1", "mail2", and "news",
        as well as "www".  Other likely names on your ISP's 
        network are "ns1" and "ns2" (for the name servers).
        You'll never type most of those names -- you set up
        your newsreader to point at your ISP's NNTP server
        and never think about what machine it's on after
        that.  DNS "MX" records take care of mail going to
        the right place (though you might have to set up
        your POP/IMAP mail program once).  So the only ones
        you really notice are www.yourisp.net and maybe 
        ftp.yourisp.net.

        Later, somebody else sets up a corporate web server and
        either figures, "Hey, everyone else seems to name their
        web server www.whatever so that must be how it's done,"
        or, "Gee, most users are going to _guess_ 'www.whatever'
        anyhow, so I might as well make it easy for them and
        just set it up that way," or even, "Someday we'll get
        big enough to want a separate machine just for the web
        server, so I'll give it its own name now even though
        it's really an alias for the general purpose machine,
        and when we get big enough I can install a separate
        machine, give it that name, and none of our business
        cards (or, more importantly, our clients' bookmarks) will 
        have to change."  Thus we get www.secondexample.com...

        Finally, even if there's a separate machine for web
        service, www.myexample.com, there my be a web server
        running on myexample.com (if a machine with that name
        exists) as well.  If so, it's likely to force a "redirect"
        to www.myexample.com.  Or the sysadmin might have done
        something funky with the router or put a "port forwarding"
        program on myexample.com so that any packets aimed at
        port 80 (the http (web) port) get forwarded to 
        www.myexample.com instead.  Or www.myexample.com and
        myexample.com might be the same machine with two names,
        so it doesn't matter which name you use.  (This could
        even be an intentional ploy to make it easy for visitors
        who forget to type "www." ... or depending on how you
        look at it, to make it easy for visitors who insist on
        adding "www." when that hadn't been told to.  Either
        way, it's a valid reason for giving the same machine
        those two names.)

So unless I missed an RFC that says the main web server for a site
is supposed to be named "www.[sitename]", the whole "www" machine
name thing is merely a convention.  But a convention that evolved
for very reasonable reasons.

(In reality, the rules and options for how to set things up 
are much more complicated, but they're complicated in ways
that make life simpler for sysadmins, and in ways that most
users never even have to notice.  For example, when I said
that a machine can have two names, really a numerical IP
address (e.g. 192.168.49.98) can have more than one name,
_and_ a single computer can have more than one numerical 
address.  As a visitor from the wilds of the Internet, you
don't have to worry about any of that unless you're in the
habit of typing IP addresses instead of names, or you're a
malicious cracker trying to map my site to prepare to try
to break in.  As an admin, it means I've got more flexibility
in how I set things up, and can better tailor the setup to
my current needs and projected future expansion.  For a user
on my network, well it matters, but if I'm doing a good job
as sysadmin, they'll never really notice when I change things
around anyhow.)

(On my home network, each machine has at least two names.
I refer to them by their cute names:  boygeorge, rupaul,
wood, carlos, cornbury, richards, tipton, eon, stjoan.  But 
if I ever start losing my memory, or if somebody else needs 
to come over and take care of my computers, and we don't want 
to have to remember that "richards" is the file server because
Renee Richards played tennis, or that "cornbury" is the
date/time server and handles the administrative logs because
Lord Cornbury was an administrator-type (colonial governor
of NY and NJ) or that eon is the machine that talks to the
outside world because Le Chevalier d'Eon was a diplomat and
spy, or that stjoan is the firewall because Joan of Arc was
a soldier, they can refer to "fileserver", "admin", "gateway",
and so on instead.  I've built in some things to make adding
a separate web server (currently tipton's doing that and 
several other things) simpler in the future.)

THE REALLY SHORT SUMMARY:

So anyhow, it started as, "We need to move web service to its
own machine.  Let's name that machine 'www'," then turned into,
"Everyone expects web service to be on a machine named 'www',
so we'd better name our web server that."

                                -- Glenn

Reply via email to