Re: How exactly does this work
That's not quite how HTTP works.
You're correct in that the browser does a DNS lookup to find the hosting box, but it then sends the whole URL to the web server. This is used by virtual-hosting setups to pick the right site, and by HTTP proxies to connect to the right server. Even if you think you are not using a proxy, most ISPs have "transparent proxies" that intercept your request, and try to satisfy it with content cached inside the network.
However, I believe that for HTTPS connections, the HTTP request is sent over the secured link. the URL is thus hidden from snoopers.