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

by "John Aitchison" <jaitchis(at)hwy.com.au>

 Date:  Sun, 14 Oct 2001 19:26:05 -0700
 To:  hwg-techniques(at)hwg.org,
Jeff Nelson <nelsonj(at)telocity.com>
 References:  localhost
  todo: View Thread, Original
On 13 Oct 2001, at 23:41, Jeff Nelson wrote:

> At 12:48 PM 10/13/2001 -0700, you wrote:
> 
> >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/
> 
> That is correct. *If* veal, chicken and fish are defined as subdomains
> of the myrecipes subdomain in DNS. Confused? Bear with me, DNS was
> designed to be nothing if not flexible. First there are 7 gTLD
> (generic top level domains). Actually, more gTLD have been added, but
> for purposes of illustration we will stick with the basic COM, NET,
> EDU and ORG. These can also be referred to as first-level domains.
> 
> Now every domain on the Internet that ends in COM, NET, EDU or ORG is
> a first-level domain name. Every domain name to the immediate  left of
> COM, NET, EDU or ORG is a second-level domain name AND is also a
> subdomain of COM, NET, EDU or ORG. So, when you purchase
> "myrecipes.com" you purchase a second-level domain which is a
> subdomain of the COM domain.
> 
> Now comes the fun part . As we move to veal, chicken, or fish several
> options are available:
> 
> 1. We subdivide the myrecipes second-level domain into 3 subdomains
> (in DNS). If we do so, the veal, chicken and fish become third-level
> domains under the myrecipes subdomain. They can be delegated to a
> different DNS server and can be administered as seperate domains in
> there own right. Or not.

to clarify here .. you mean I could go to nameregistrars or 
networksolutions or somesuch and pay $$ for 
chicken.myrecipes.com ? 
 



> 2. Veal, chicken or fish can become aliases (or CNAMES in DNS
> parlance) such that each name can point to a different IP. Or the same
> IP if you wish.

ok, I googled on CNAME .. thanks for the pointer and found
http://www.rscott.org/dns/
which has the charming title of "DNS Oversimplified.. or even a 
rocket scientist can understand DNS"

Well, I am a rocket scientist .. nah, not really, I was only a humble 
high energy physicist ..things that go boom, not how you transport 
them..  and it looked like rocket science to me .. probably best if I 
reread it in the morning.


Now this "oversimplified" site says, inter alia

"Finally, [RFC1912 2.4] suggests that CNAMES are good for 
generic names, for example, having "www.mydomain.com CNAME 
funky.mydomain.com", so the machine can have its own official 
name, but users can still find it without knowing its real name. Be 
careful with this though! In this case, you can have an A record for 
www.mydomain.com pointing to the IP address that 
funky.mydomain.com has (however, a reverse DNS lookup for the 
IP address can only return one of the names). "

um, okay. dunno what an A record is, but I'll ignore that.   
funky.mydomain.com is sorta like chicken.myrecipes.com but the 
above suggests to me that 

a) this is applicable to 'machines' ie the situation where 1 machine 
== 1 host. Maybe they mean ,by machine, IP. 

b)  the CNAME records need to be on the DNS server. If I 
understand it correctly, the DNS server machine is not the host and 
indeed the DNS records are propagated around the world. So, using 
a CNAME approach does this mean that the 
chicken.myrecipes.com == myrecipes.com equivalence has to be 
broadcast everywhere?


I was sort of hoping for a scenario like this. A user enters 
chicken.myrecipes.com in a browser.  This gets parsed right to left 
by the nearest DNS, which sees that there is no IP address for 
chicken.myrecipes.com but there is one for myrecipes.com which 
has an IP address of xxx.yyy.zzz.a  .. so the packet gets shunted off 
there. When it reaches the host with this IP, some further 
processing takes place, and says OK, you really want the chicken, 
you can have the chicken. Or the fish.
 



> 
> 3. Veal, chicken and fish can be host names.

OKAY.  Not what I want, but I will bear it in mind if I ever want a 
server farm.

> 
> Note: It bears mentioning, and is often a point of confusion when www,
> ftp, telnet, etc. are used as host names. With respect to DNS, one
> could just as easily use aaa, pta, and nettel with the same result.
> You could, in other words call your website ftp.myrecipes.com without
> any ill effects in DNS. These terms have no correlation to the
> protocols they represent.

uhuh. I have often seen www2 or somesuch .. these then are 
different physical machines ? or can there be multiple hosts on a 
single machine?


> 
> >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".
> 
> See above explanation.
> 
> 
> >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.
> 
> You are indeed correct. They are two different animals.
> 
> 
> >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?
> 
>   Yep.
> 
> >
> >
> >(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.
> 
> Seems so. Fiddle but back up first.
> 

yes, I will. My host wants to charge me $25 for each subdomain 
setup (I might just do one and see what they do), this could get 
expensive for chicken.myrecipes, veal.myrecipes .. 
patedefoiegras.myrecipes etc .  I am having difficulty in 
communicating to the tech support people that I want just one 'true' 
domain and the 'subdomains' to be nothing more than server side 
code based redirections to subdirectories.  



> >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
> 
> Just a link (a shortcut in Win32speak), however for your purposes, you
> would treat as usual.
> 
> 
> >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
> 
> Either/or. The determining factor seems to be if and at what frequency
> you are linked to other pages.
> 
> >
> >
> >b2) and what about subdomains? are the search engines going to
> >separately index    veal.myrecipes.com
> >   chicken.myrecipes.com
> >   fish.myrecipes.com
> 
> Yep.
> 
> 
> >Thanks in advance for any feedback, hints, corrections, guidance..
> 
> 

Thanks for the help. I am coming to this web business a bit out of 
left field and finding my way through the maze is sometimes a grind 
.. so I really do appreciate the helpfulness and willingness to share 
of all on this list.

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

This page is part of a preserved archive of archives.hwg.org. The site is no longer active and its content is not maintained. For enquiries about this archive, write to archive(at)iwanet.org.