Re: 2 Subdomains - 1 IP Address

From: Roland Hall (nobody_at_nowhere)
Date: 01/26/05


Date: Wed, 26 Jan 2005 02:53:03 -0600


"Rob" wrote in message
news:WOGJd.5801$YD5.4814@newsread3.news.pas.earthlink.net...
: Roland,
:
: Again, thanks a lot for your reply and helping my out with this. See
: comments bellow.

You're welcome. You know, we've all been there. We're just trying to make
it easier for you to minimize what we went through.

: I really would like to thank Roland and Jeff (and everybody else) for
: helping my out with this. Being a complete newbie to this I probably was a
: PITA but it sure has helped me out. Thanks a bunch.

Jeff is a very helpful guy. There are a few PITAs on here (spammers), but
you're not one of them. The only bad question is one not asked. If you're
not sure how something works or if something told to you does not make sense
or is confusing, speak up because otherwise we think you get it.

: "Roland Hall" <nobody@nowhere> wrote in message
: news:#JKhTGrAFHA.2712@TK2MSFTNGP15.phx.gbl...
: > "Rob" wrote in message
: > news:rLlJd.5144$r27.792@newsread1.news.pas.earthlink.net...
: > : Thanks for the input. As pointed out in my previous email I am almost
: 100%
: > : sure (never say 100% ;)) that the home directory and default documents
: are
: > : configures right. Also from your comments I think my understanding on
: how
: > : IIS works is correct. The real reason for my problem seems to be that
: IIS
: > : *THINKS* that site2 has no default documents defined (see comments
: > bellow).
: > : Any idea why that could be?
: >
: > Rob...
: >
: > With all due respect, unless you try our suggestions you're going to
: prolong
: > this issue.
:
: I have read all the posts carefully and tried what was suggested to me.
The
: only exemption is the DNS stuff.

You should include that immediately that you are eliminating that part
because naming is key on this issue.

 The reason I haven't tried it yet (but I
: will) is because I followed Jeff's (I think) suggestion in adding the
sites
: to the hosts file. After that http://www.site1.gotdns.com and
: http://www.site2.gotdns.com did work.

A HOSTS file will work because the client will look there first. However,
it only works on that computer and is not a replacement for DNS. DNS is a
lot more powerful but if you're not familiar, it can be overwhelming. But,
that's ok. There are enough DNS aware people on this site to get you there,
step by step, if need be. The DNS group is one of the few that every
question gets answered with rapid results. It's mind boggling.

: Actually, adding the sites to the host file might not be the best idea as
: that probably only works if I am behind my router but not if I take my
: development environment to some other site. I want to check that and then
: also try it with the DNS entries as you have suggested.
:
: > 1. www.gotdns.com is a subdomain. site1.gotdns.com is a subdomain.
: > site2.gotdns.com is a subdomain. You do not need WWW in your web site
: name
: > for any reason other than it is popular. Technically is it NOT
required.
:
: www.gotdns.com is a subdomain?

Actually, it is. The root, is not seen. It is the . (dot) at the end. The
TLD (top level domain) is .com. The 2nd level domain is gotdns, but your
"domain" is referred to as gotdns.com. The host value is next, which makes
it the 3rd level. However, it is referred to in different contexts.
www.gotdns.com is your web site address but if you have a blank host record,
gotdns.com is your web site address. So, you don't need
www.site1.gotdns.com when site1.gotdns.com will do. Yes, people are used to
typing in www as a prefix to a web site but it only works if an entry is put
into the DNS to accept it. It doesn't work by default. It is usually an
alias, pointing to the domain address. Sometimes people put it in as a
duplicate name for the IP address of the web site but an alias is all that
is needed. Subdomains site1 and site2 are entered the same way in the DNS.
The DNS only resolves a name to an IP address and vice versa. It eliminates
needing to know that 207.46.130.108 gets you to microsoft.com.

For host headers, it allows you to send a FQDN (Fully Qualified Domain Name)
address in an HTTP header and have it pull that information out and compare
it with its setup to route you accordingly. So, if your host header says:

site1.gotdns.com accepts requests on x.x.x.x IP address and routes to
c:\inetput\wwwroot\site\ then if someone is at http://site.gotdns.com/ they
are sitting at the web root and expect to get the default document which is
physically here: c:\inetpub\wwwroot\site1\default.asp [assuming default.asp
is your default document].

My default web site is running but it's only for my private network. I have
removed anonymous support so you can only get to my other sites with the
name. The IP address will be sent to the default web site and you'll be
prompted to logon, which will require a domain account and password. This
way, my web sites only respond to calls made specifically for them.

: I thought that is a domain and
: site2.gotdns.com is a subdomain. I guess I have to read up on that again.
: Anyways, yes, I am aware that the www is not required. On dyndns.com I
have
: enabled wildcards because many people are so used in just adding www.
: In IIS
: I have added host headers for both site[x].gotdns.com and
: www.site[x].gotdns.com. So it should respond to both variations.

But they can only get there if DynDNS has entries for site[x].gotdns.com and
www.site[x].gotdns.com. That is the public DNS that everyone will query.

: > 2. localhost is not a domain. It has no domain in it so host headers do
: not
: > effect it. Localhost defaults to 127.0.0.1 or the TCP/IP localloop
: address.
: > If you want to test that, open a command prompt and type in: ping
: localhost
:
: This and your 3rd point were the KEY point to understanding my problem, I
: think. I always thought that site1.gotdns.com and //localhost/site1 were
: identical.

Confusingly they point to the same place but only if you're on the server
console because localhost is actually 127.0.0.1.

: But after this answer the way I understand it now is that they
: are quite different. site1.gotdns.com is what really brings me to a
: particular website (with the help of the host headers). //localhost/site1
is
: just a sub-directory of the default web site.

Correct but site.gotdns.com can still point to the same physical path.

: So the host headers do not
: come into play at all.

Not with localhost because it is not a domain.

: I know people did try to point that out to me before
: but I just didn't get it. It doesn't happen to me that often but one in a
: while my mind is just set too much into one way of thinking that I don't
see
: other ways.

I've never known anyone to grasp everything new the first time, except
possibly some ex-gfs [Miss Always Right]. However, please ask when you
don't understand. If someone cannot clarity it well enough, someone else
may enter into the conversation to help out. I see posts all the time where
I think, "That's a lot better way to put it. No wonder nobody understood
what the hell I was talking about."

: > 3. You're using the default web site. That is why localhost is
: responding.
: > It is also why the second site is not responding because localhost only
: > works with the default. It cannot point to another web site because
there
: > is no domain information in the name.
: > 4. I have the same setup and I wrote down step by step exactly what I
did
: to
: > make it work.
: > 5. If you have DNS, you do not need a HOSTS file.
:
: Hosts did work for me. Anyways, as pointed out in 1) I think this solution
: might have some limitations so I still plan to test the DNS solution.

It does as I stated above because everyone else would have to do the same
thing. With DNS, they'll get it.

-- 
Roland Hall
/* This information is distributed in the hope that it will be useful, but 
without any warranty; without even the implied warranty of merchantability 
or fitness for a particular purpose. */
Online Support for IT Professionals - 
http://support.microsoft.com/servicedesks/technet/default.asp?fr=0&sd=tech
How-to: Windows 2000 DNS: 
http://support.microsoft.com/default.aspx?scid=kb;EN-US;308201
FAQ W2K/2K3 DNS: 
http://support.microsoft.com/default.aspx?scid=kb;EN-US;291382 


Relevant Pages

  • Re: web site and DNS service on the same server
    ... > I've just started hosting a web site and DNS service on ... > host headers, in which the host headers in the web site ... In the DNS management console open the jointfilms.com forward lookup zone, ... Incedentally, you have only one DNS server for this domain, won't your ISP ...
    (microsoft.public.windows.server.dns)
  • Re: Which zone is appropriate Primary, Secondary or Stub?
    ... local host "A" record on my W2K3 DNS to point to a local intranet. ... What type of zone do I create that won't interfere with internal ... Local user types intranet.company.com into browser, local DNS resolves ... web site hosted at your hosting provider. ...
    (microsoft.public.windows.server.dns)
  • Re: #host localhost
    ... $ host localhost ... with a cost -- the cost of learning about DNS and configuring your ...
    (comp.unix.bsd.freebsd.misc)
  • Re: DNS problem?
    ... I went into DNS and into the domain folder. ... It let me add a new host with the ... IP address of the web site and said it added successfully but still no luck. ... >> I set up a network with Win2000 server and things seem fine. ...
    (microsoft.public.win2000.dns)
  • Re: Hosting 2 Sites Same Server
    ... Set your DNS to point to the same IP address as the other site. ... Set the FQDN after clicking the advanced button the web site tab. ... Put those in your host headers ... without even the implied warranty of merchantability ...
    (microsoft.public.inetserver.iis)