A-Z Popular Blog Security Search »
Related Guides

What is Localhost?

Localhost is a network address that is used to allow a computer or device to communicate to itself.

Localhost IP

The IP address is normally used for localhost. The IPs through are reserved for localhost. These extra addresses are rarely used.

IPv6 Localhost

The IPv6 address ::1 is reserved for localhost. This is the only address for localhost under IPv6.

Localhost Address

The localhost address can be resolved by the domain name system (DNS). However, it is a good practice for hosts to resolve this internally. This has benefits to the host in terms of speed and information security. It also prevents the domain name system from being overwhelmed by localhost lookups. An extremely large number of requests are generated for localhost as it is a common way for systems and applications on your computer to talk to each other.

Host File

A host file is a configuration file that allows you to override the IP for hostnames. It is a good practice to put the following line in your host file to prevent localhost from being looked up in DNS: localhost
It is also possible to use add other hostnames to the host file that map to This is a common way for developers to test code locally using a domain name.

Localhost vs Private IP

A private ip is an IP address that isn't open to the internet. This is used to communicate to machines on a private network such as a local area network ( LAN). It is a common mistake for software to request local resources using the local machine's private IP. This has security and bandwidth implications as such requests are handled with a network interface.

Localhost vs Public IP

A public IP is an IP address that is exposed to the internet. It is a poor practice to request local resources with your machine's public IP as such requests are exposed to the internet.


Requests made to localhost use a special device known as a loopback. A loopback device handles requests locally without hitting any connected networks.


Music mixing software connects to synthesizer software on localhost. This allows the software to be stable when there is no network connection. It also doesn't consume any bandwidth. The synthesizer is more secure because it only listens to and can't be reached from the internet.
Overview: Localhost
A network address that is used to allow a computer or device to communicate to itself.
Related Concepts


This is the complete list of articles we have written about networking.
Campus Network
Internet Backbone
Internet Of Things
Last Mile
Network Security
Personal Branding
Pervasive Networks
Point Of Presence
Private Network
Proxy Server
Public Network
Reverse Proxy
Space Network
More ...
If you enjoyed this page, please consider bookmarking Simplicable.


A list of networking techniques and concepts.


The definition of synchronous with examples.


The definition of host with various examples.


The definition of network node with examples.

API Gateway

The definition of API gateway with examples.

High Latency

The definition of high latency with examples.

Keep Alive

A complete overview of keep alive with examples and diagrams.

Network Architecture

A guide to network architecture.

Radio Waves

A list of the basic types of radio waves with useful charts.

Animated Gif

Everything you ever wanted to know about animated GIFs but were afraid to ask.

Software vs Hardware

The difference between software and hardware with examples.

Cached Data

The definition of cached data with examples. Includes an explanation of why cached data can usually be deleted safely.


The definition of delete with examples.


The common types of modern computer.

Application Server

An overview of application server with examples.
The most popular articles on Simplicable in the past day.

New Articles

Recent posts or updates on Simplicable.
Site Map