Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

When I capture packets using the packet analyser wireshark while visiting I can see packets that use the HTTP protocol (e.g.a GET request). My Get request uses 4 protocols: Ethernet II, IPv4, TCP and HTTP. For the IPv4 I can see my own local IPv4 address of my pc as the source, for the destination I see the IPv4 address When I go to this address in my browser I get to some wikipedia related website that says'wiki does not exist'. Why am I not seeing the Hydrogen article when I go to that ip address?

share|improve this question
up vote 6 down vote accepted

Most probably because wikipedia is running virtual hosts; the server has multiple hostnames.
For example has the same IP address. A big machine can have hundreds of virtual hosts, limited by CPU, memory and bandwidth for that machine

Web browsers add a Host: header to the request, which is the hostname from the URL you type in. The webserver will serve a different 'virtual server' including different pages depending on the Host: header of the request. When you go to the server using the IP address, you send the IP address as the Host:. The webserver has a base configuration for that request, but likely not the one you expect.

share|improve this answer

It is routine for multiple web sites to be served from the same IP address. Using the IP address in the URL is not enough for these sites. You must provide the proper domain name, which your browser will put into an HTTP Host header which tells the server which website you want.

share|improve this answer

While your requests are identical at the TCP layer and below, they differ on the HTTP layer. You will notice, that in your first request the Host field in the header contains the hostname that was found in your original URI while the request with the IP address instead of the hostname has an Header field which is empty or contains only the IP address. See RFC 2616 for technical details.

Without the Host field there would be no possibility for the server to know to which host the request was directed. This would not allow using multiple hostnames (with different websites) on one IP address. Mass web hosting would be inefficient because it would require dedicated IP addresses for each hostname. The concept of virtual hosts solves this problem by using the Host header field to distinguish requests to different hostnames and allows an unlimited number of hostnames on one IP address and serve different content on each of them. Wikipedia probably uses this to serve the different language editions from the one server that you asked. Without the hostname your request lacks the information, which language is requested.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .