What Is the 127.0.0.1 IP Address?

This loopback IP address/localhost is the universal home address for all computers

The IP address 127.0.0.1 is a special-purpose IPv4 address and is called the localhost or loopback address. All computers use this address as their own, but it doesn't let computers communicate with other devices as a real IP address does.

How 127.0.0.1 Works

All messages generated by TCP/IP application software contain IP addresses for their intended recipients. TCP/IP recognizes 127.0.0.1 as a special IP address. The protocol checks each message before sending it to the physical network. Then, it automatically re-routes any messages with a destination of 127.0.0.1 back to the receiving end of the TCP/IP stack.

Ping loopback addresses

To improve network security, TCP/IP also checks incoming messages arriving on routers or other network gateways and discards any that contain loopback IP addresses. This doublecheck prevents a network attacker from disguising their traffic as coming from a loopback address.

Screenshot of DNS Server field in Windows 10 showing 127.0.0.1

Application software typically uses this loopback feature for local testing purposes. Messages sent to loopback IP addresses like 127.0.0.1 do not reach outside to the local area network. Instead, messages are delivered directly to the TCP/IP and receive queues as if they had arrived from an outside source.

Loopback messages contain a destination port number in addition to the address. Applications can use these port numbers to subdivide test messages into multiple categories.

Your computer might have the 192.168.1.115 private IP address assigned to it so that it can communicate with a router and other networked devices. However, it still attaches the special 127.0.0.1 address as something like an alias to mean, in networking terms, this computer.

The loopback address is only used by the computer you're on, and only for special circumstances—unlike a regular IP address that transfers files to and from other networked devices. For example, a web server running on a computer can point to 127.0.0.1 so that the pages run locally and test before it's deployed.

Localhost and IPv6 Loopback Addresses

The name localhost also carries a special meaning in computer networking used in conjunction with 127.0.0.1. Computer operating systems maintain an entry in their HOSTS files associating a name with the loopback address. This practice helps applications create loopback messages using a name rather than a hard-coded number.

Internet Protocol v6 implements the same concept of a loopback address as IPv4. Instead of 127.0.0.01, IPv6 represents its loopback address as ::1 (0000:0000:0000:0000:0000:0000:0000:0001) and, unlike IPv4, it does not allocate a range of addresses for this purpose.

127.0.0.1 vs. Other Special IP Addresses

IPv4 reserves all addresses in the range 127.0.0.0 up to 127.255.255.255 for use in loopback testing, although 127.0.0.1 is (by convention) the loopback address used in almost all cases.

127.0.0.1 and other 127.0.0.0 network addresses do not belong to any of the private IP address ranges defined in IPv4. Individual addresses in those private ranges can be dedicated to local network devices and used for inter-device communication, whereas 127.0.0.1 cannot.

People studying computer networking sometimes confuse 127.0.0.1 with the 0.0.0.0. IP address. While both have special meanings in IPv4, 0.0.0.0 does not provide any loopback functionality.

FAQ
  • How do I remove a 27.0.0.1 proxy server virus?

    If you suspect a 27.0.0.1 proxy server virus, perform a system restore to wipe out any recently-downloaded or installed apps or drivers that could be the cause without risking your important files.

  • How do I block a website with 127.0.0.1?

    It's easier to block specific websites using a browser's built-in tools, but you can also use the Windows Hosts file and 127.0.0.1. Open Notepad as an Administrator with User Account Control, then select File > Open > and open the Hosts file. Add a line at the bottom of the file and enter 127.0.0.1 [URL] > Save, then restart.

Was this page helpful?