(E-Mail Removed) wrote:
> A web server usually hosts many domains, ie "abcd.com", "123456.com"
> etc.
A webserver can host many domains; it may host only one.
> How does a web server indentifies which domain to server ?
Allen Kistler <(E-Mail Removed)> wrote:
> Your browser sends the whole URL to the server.
That's not technically correct, but it's a good approximation. See
#2 below.
There are two ways that a webserver can identify which of potentially
several websites it needs to serve.
1. Each website might be assigned a unique IP address. The webserver can
determine the target IP address and deliver content accordingly. This
is required when negotiating SSL connections, as the webserver needs to
know which certificate to send before the session can be sufficiently
established to receive the Host header described in #2
2. Along with the GET/POST/whatever verb and target URI path, the browser
sends a "Host" header to identify the target host. This only works for
HTTP/1.0 and greater, but I'm not aware of anything still using HTTP/0.9.
GET /some/path/index.html HTTP/1.0
Host:
www.roaima.co.uk
Chris