Why do I not get to the same website when using this IPv4 address instead of the url?

Solution 1:

Most probably because wikipedia is running virtual hosts; the server 91.198.174.225 has multiple hostnames.
For example fr.wikipedia.org 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.

Solution 2:

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.

Solution 3:

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.