RE: Subdomains or Third level domain names? - how to set up?

by "Brett Errington" <brett(at)opensearch.com>

 Date:  Sat, 13 Oct 2001 13:33:52 +0800
 To:  <hwg-techniques(at)hwg.org>
 In-Reply-To:  localhost
  todo: View Thread, Original
Hi

I don't know too much about all the stuff your talking bout, coz it
doesn't usually affect me that much. I know the basics like you
obviously do and that's enough for me. One thing I can tell you is that
usually I find that something like:

veal.myrecipes.com

is really pointing to:

www.myrecipes.com/veal

and to me that is what a sub domain is. Someone correct me if I'm wrong,
but that has just been my experience. Anyway, hope this helps.

Later,
Mr Brett
 
"That's a pain that will surely linger, and that's no lie"
- Ed Grimely

-----Original Message-----
From: owner-hwg-techniques(at)hwg.org [mailto:owner-hwg-techniques(at)hwg.org]
On Behalf Of John Aitchison
Sent: Sunday, 14 October 2001 3:49 AM
To: hwg-techniques(at)hwg.org
Subject: Subdomains or Third level domain names? - how to set up?


gidday

I am not sure if I am using the correct terminology here .. what I am 
referring to is the situation like
  veal.myrecipes.com
  chicken.myrecipes.com
  fish.myrecipes.com

Googling around I see them referred to as third level domain names 
eg at
http://www.halleluiah.com/
but 
http://searchwebmanagement.techtarget.com/sDefinition/0,,sid27_gci
211988,00.html
seems to suggest that the third level domain name (reading right to 
left) is a server name, and that  {veal,chicken,fish} are  most 
properly referred to as "subdomains".

I think I am correct in saying that subdomains are not virtual 
domains .. virtual being virtual only by virtue of the fact that they
are 
hosted on someone elses server .... nor are they redirected 
domains afaik. I am just trying to clarify this terminology before I get

to the meat of the question - sorry to be long winded.

By way of example my host is www.olm.net which hosts my main site
www.datasciencesresearch.com which has its own IP address and
another site of mine www.acountryfocus.com which is redirected to 
the same IP as www.datasciencesresearch.com. So I guess I would 
call www.datasciencesresearch.com a virtual domain, and 
www.acountryfocus.com a redirected virtual domain? 

(The redirection, btw, I found - after some detective work is done by 
a script called .index.cgi in my /home/datasciencesresearch/www 
directory - and I could only find this file by putting -al in the little

white box on the far RHS of WS_FTP ; lots of gotchas in this 
business <g>- and that looks something  like

#!/usr/bin/perl

$server = $ENV{'HTTP_HOST'};
i
if ($server eq "acountryfocus.com" || $server eq 
"www.acountryfocus.com") {
    print "Location: http://acountryfocus.com/acountryfocus/\n\n";
    exit;
}

#NEXT

else {
    print "Location: http://$server/index.htm\n\n";
    exit;
}
print "Content-type: text/htmlnn";


so since acountryfocus is pointing to the same IP as 
datasciencesresearch, I guess the line 
 print "Location: http://acountryfocus.com/acountryfocus/\n\n";
is pointinging to datasciencesresearchcom/acountryfocus which is 
a directory with the appropriate index.htm.

So far so good .. I think I understand the mechanism for "redirected 
virtual domains".



Now to subdomains

It seems to me logical that a line like

if ($server eq "datamining.datasciencesresearch.com" || $server eq 
"www.datamining.datasciencesresearch.com") {
    print "Location: http://datasciencesresearch.com/datamining/\n\n";
    exit;

in .index.cgi  should give me the 'subdomain' datamining.

I am loath to fiddle with the .index.cgi file  without first checking
with 
my hosting service, but I'd like to know if my logic is approximately 
correct.


A couple of other questions .. again, apologies for the length of this 
missive:

a) when I FTP into my site, the directories (folders) /www and 
/access-log have special symbols beside them, implying perhaps 
that they are not 'normal' folders .. I don't think it is just related
to 
access permissions. WS_FTP 'dirinfo' shows www -> 
/www/datasciencesresearch which makes me think there is a 
remapping of some kind .. you can tell I don't know much about Unix

b) Does anyone know whether search engines index by IP or by 
URL? I am wondering if there might be a disadvantage to having 
redirected domains 

b2) and what about subdomains? are the search engines going to 
separately index    veal.myrecipes.com
  chicken.myrecipes.com
  fish.myrecipes.com

Thanks in advance for any feedback, hints, corrections, guidance..

HWG hwg-techniques mailing list archives, maintained by Webmasters @ IWA