Question

So I tried to access certain website using its server IP address and usually it does not go through. Let's assume IP masquerade technique is not being used such as NAT or reverse proxy.

This makes me wonder: Does the DNS reply to the client more information than just the IP address? such as the paths to the correct folder in the server, index, etc

Otherwise, why can't we access websites by just typing in its IP address?

Thank you

Was it helpful?

Solution

DNS can respond with some additional data like mail exchange server, but that's not related.

Usually we can't access websites by IP address using web browser, because there are more than one websites or web services on single IP. The browser sends a special HOST header (which usually is the domain name that user typed), in request and - this header contains the website name.

So the browser requests specific website from given IP by sending what user typed in address bar, to the server basically... and if you only type IP then the browser is lacking additional info needed for the server to send you specific website.

https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.23

Licensed under: CC-BY-SA with attribution
scroll top