If you ever wonder how it’s possible for servers to take requests for many domains and know which one to serve up, this article is for you. The secret is in a mandatory HTTP header field and it’s actually quite simple.
http://www.iceteks.com/articles.php/virtualhosting/