Reputation: 1305
So, a DNS server recognizes https://www.google.com as 173.194.34.5
What does, say, https://www.google.com/images/srpr/logo11w.png look like to a server? Or are URL strings machine readable?
Upvotes: 3
Views: 1757
Reputation: 99786
Good question!
When you access a url, first a DNS lookup will be done on the host part (www.google.com
), after that the browser will look at the protocol and connect using that (https
in this case).
After connecting, the browser will tell the server:
"Hi! I'm trying to connect to www.google.com
and I would like the resource /images/srpr/logo11w.png
). This looks like this on the protocol:
GET /images/srpr/logo11w.png HTTP/1.1
Host: www.google.com
The Host
part is a HTTP header. There are usually more headers.
So the short answer is:
The server will get access to both the hostname, and the full path the browser tried to access.
Upvotes: 3
Reputation: 13600
consists of several parts
srpr
, which is in a directory images
in the root of the website)The server processes path to the resource the user requested (via GET method) based on various rules and returns a response.
Upvotes: 2