Don't confuse name resolution with routing, and neither has much to do with the names of web sites.
When a web browser wants to access a web page, it asks the OS to resolve the name (like "www.linuxquestions.org") into an IP address. It then contacts port 80 on the host with that IP address, and sends an HTTP request for the site in question:
Code:
GET / HTTP/1.1
host: www.linuxquestions.org
[--- other headers may follow, identifying the browser, OS etc. ---]
Exactly one instance of name resolution is ever performed in that scenario, and it's done on the client side. Your local DNS zones in
bind are never consulted.
The web server then usually does one of three things:
- it looks at the host header, finds the site, and serves up a web page
- it looks at the host header, doesn't recognize the site, and serves the default site instead
- it looks at the host header, doesn't recognize the site, but has no default site definition and returns an error message
However, the web server may in fact be be a reverse proxy, which may act as a redirector and/or load balancer. In that case, there's a fourth option:
- it looks at the host header, consults a configuration file, sends an identical request to another server, and returns the results to the client
In that case, the reverse proxy configuration file may refer to an IP address or the internal host name of your virtual server. In the latter case, your internal DNS zone is indeed consulted (by the proxy server) to resolve the name into an IP address.