3 ms·
How does this work? Isn't 127.0.0.1 a loopback? How does it get to the internet?
by tootie 12y ago
How does this work? Isn't 127.0.0.1 a loopback? How does it get to the internet?
- sp332 12y agoYour browser asks the DNS server for the IP address corresponding to the domain name. If you ask for google.com it will reply e.g. 74.125.228.228 and then your browser will connect to 74.125.228.228 directly. When your browser asks that same DNS server for til.io's IP address, it gets 127.0.0.1, and then your browser connects to 127.0.0.1!
- astrodust 12y agoThe point is it doesn't go to the internet, it just sets up an alias to your local machine. This is useful when you want to have several different virtual hosts on your machine, all of which would otherwise be called "localhost".
- extc 12y agoIt does go to the Internet, for the DNS query. This won't work offline.