domain name and ip addr difference

Chip Old fold at bcpl.net
Sun Apr 1 20:57:48 UTC 2001


On Sun, 1 Apr 2001, CB O'Brien wrote:

> Why is it that when I type in the site name address I come out to the
> correct site but should I type in the IP number I come out to the
> Hosting Site where the domain website is residing and not the website
> itself.
>
> Is it because of a virtual domain?
>
> On another pc I type in the original website name as above,it takes me
> to a completely different website and type in the IP number it takes
> me to the hosting site again.
>
> Both machines use different dns servers and gateways.

This isn't a BIND issue, it's an HTTP issue.  The ISP hosting that Web
site probably does name-based virtual hosting instead of IP-based.  In
IP-based virtual hosting, each Web site has its own IP address assigned
from the ISP's address space.  That uses up IP addresses pretty fast, so
these days most ISPs do name-based hosting.

In name-based hosting the ISP sets aside one IP address to be used by all
the Web sites he hosts.  When a Web browser requests pages from one of
those sites, the ISP's Web server figures out which site has been
requested from the header information in the request.  This obviously
conserves IP addresses, and it works with any Web browser that complies
with version 1.1 of the HTTP protocol.  If the browser does not comply
with that part of the standard, a request for ANY Web site using that
shared IP address will always bring up the pages from the first site
listed for that IP address.  Similarly, a request using the IP address
rather than the FQDN will alweays bring up pages from the first site
listed for that IP address.

Without knowing the specifics, my guess is that the first browser you used
was HTTP 1.1 compliant but the second one was not.

-- 
Chip Old (Francis E. Old)               E-Mail:  fold at bcpl.net
Manager, BCPL Network Services          Voice:   410-887-6180
Manager, BCPL.NET Internet Services     FAX:     410-887-2091
320 York Road
Towson, Maryland 21204 U.S.A.



More information about the bind-users mailing list