127.0.0.1
What is it?
127.0.0.1 is the standard IPv4 loopback address used by operating systems to route network traffic back to the same machine. Traffic sent to this address stays inside the local network stack and never goes out over a physical network interface. Developers use it to run and test web and mobile services locally, since it isolates the server to the host machine unless explicitly configured otherwise.
Practical example
If you start a Node.js or Flask dev server bound to 127.0.0.1:3000, you can open http://127.0.0.1:3000 in a browser on the same machine to view your app. However, if you want to test from a phone while the server runs on your computer, 127.0.0.1 on the phone refers to the phone itself — you either bind the server to 0.0.0.0 or the computer's LAN IP, or use emulator-specific addresses (for example 10.0.2.2 for the Android emulator) to access the host. Also note that binding to 127.0.0.1 is a simple security measure during development, because it prevents external machines from connecting by default.
Test your knowledge
Which of the following statements about 127.0.0.1 is correct?