When you (or your computer) call an IP address, you are usually trying to contact another computer on the internet. However, if you call the IP address then you are communicating with the localhost – in principle, with your own computer. But what is the point of starting a virtual conversation with yourself? What do you need the localhost for and how does it work?

  1. What is localhost used for?

What is localhost?

The first point to make when explaining what a localhost is, is that it is always your own computer: when you call the localhost, your computer is talking to itself. However, this is a condensed approach. The localhost is not always directly identified with your computer. In most cases, it has a separate IP address like within your personal network, which is different to the one you use on the internet, and is usually dynamically assigned by the internet service provider. When you are talking about a localhost, you are referring to when a server is used on your own computer.

Conversely, this means that the term is only used in the context of networks. “Localhost” is not just the name for the virtual server, but also its domain name. Just like .test, .example or .invalid,., .localhost is a top-level domain reserved for documentation and testing purposes. When you try to access the domain, a loopback is triggered. If you acces 'http://localhost' in the browser, the request will not be forwarded to the internet through the router, but will instead remain in your own system. Localhost has the IP address, which refers back to your own server.

Just start your local server first. Depends on which one you are using, like xamp, wamp etc. Then open up any of your browser and type “ and hit enter. Localhost is a hostname i.e. The name of the computer you are using. It is used to access the network services that are running on the host via its loopback. How to configure localhost for windows 10. Hi Zainal I have seen this before, if you use instead of localhost, does your Index page render? Getting Public IP using SSH. SSH also known as Secure Shell is a secure communication protocol used for remote communication between client and server. Furthermore, SSH can also be used for establishing tunnels to make your localhost accessible to the public. In this blog we will see how to use SSH for establishing tunnels between your localhost and public internet. – how does loopback work?

IP addresses are used within a network to communicate with each other. Each participant in the network has their own address. Data packets sent via TCP/IP are able to reach the correct destination when this system is used. The protocol pair Transmission Control Protocol (TCP) and Internet Protocol (IP) are some of the cornerstones of the internet. However, TCP/IP is also used outside the internet, in local networks. During transmission, the Internet Protocol is responsible for allowing the IP address and subnet mask to address subscribers in a network.

The allocation of public IP addresses (those that can be reached through the internet) is regulated by an international organization: the Internet Corporation for Assigned Names and Numbers (ICANN). ICANN is also responsible for the allocation of domain names, or the Domain Name System (DNS). However, certain address ranges are reserved for special purposes, like the range from to There is no reliable information on why that range was chosen, but you are free to speculate.

Until the 1990’s, IP addresses on the internet were divided into different classes. The first class (Class A) started with (this address is also reserved) and ended with 127 is the last block within the Class A network. This important position could have been the reason why it was chosen.

A Localnet can be set up within this address range. The special thing about this range is not only that it was reserved by ICANN, but is also that IP addresses are not uniquely assigned in it, as is usually the case. But how does it work?

With IPv6, the address ::1 is reserved for loopbacks.

For example, if you enter an IP address (or corresponding domain name) in your browser, the router will forward your request to the internet and to the correct server. This means that if you enter, you will reach the Google homepage. However, the situation is different with because requests to this address will not be forwarded to the internet. TCP/IP recognizes from the first block (127) that you don’t want to access the internet, you are calling yourself instead. This then triggers the loopback.

Conversely, the protocol does not accept external requests addressed to, as it would mean that attackers could try to sneak into their system. Packets reportedly appearing on the internet from reserved IP addresses like are known as Martian Packets.

A loopback device is created so that the back link to your own computer works. This is a virtual interface that is created through the operating system. With Unix systems, the interface is called lo or lo0 and can also be displayed using the ifconfig command. A similar command for Windows is ipconfig.

If you consider the technology independently of the local host, a loopback can be created in an analog way: circuits in communication technology can then be used to determine whether the paths taken by the signal and the reception are correct.

What is localhost used for?

Developers use the local host to test programs and web applications. Network administrators can also use the loopback to test network connections. Another practical use for the localhost is the hosts file, where you can use the loopback to block malicious websites.

For Testing Purposes

Localhost’s main use in web servers is for programming applications that need to communicate over the internet. During development, it is important to find out whether the application actually works as hoped once it has internet access. Localhosts’ other functions are only possible if the required files can be found on the internet - for example, there is a difference between opening a HTML document on your PC or loading it onto a server and accessing it. Releasing an unfinished product without testing it doesn’t make sense, so developers use a loopback to test them. They can stimulate a connection while also avoiding the network detour: the connection instead just stays completely inside their own system.

Another advantage of using localhost for testing purposes is its speed. When you send a request over the internet, it takes more than 100 milliseconds. If you send a ping to localhost, the maximum transmission time is just one millisecond. With this technology, you can also find out whether or not the Internet Protocol is correctly implemented. To test this yourself, just open the command prompt (Windows) or terminal (Unix/Mac) and use the ping command. You can either send it to the domain localhost or directly to the IP address.

ping localhost

How To Get To Localhost


If you want to set up your own test server on your PC to address it through the localhost, you first need to install the right software. It is generally possible to run any standard web server on your own computer, but there is also special software specifically designed for use as a localhost – XAMPP for example. La crosse atomic digital clock. We provide a step by step guide for how to install and configure the test system in our Digital Guide.

To block websites

Localhost also plays a role in the hosts file. In principle, this file is a predecessor of the Domain Name System (DNS): in it IP addresses can be assigned to the corresponding domains. If you enter a website address in the browser, the domain name needs to be translated into an IP address. It used to be the host file, but today you would usually use the global DNS. However, the host file is still present in most operating systems. With Windows, you can find the file under system32driversetchosts; with macOS and other Unix systems, it is found under /etc/hosts.

If you yourself have not made any file changes, there are probably these two entries left: localhost

::1 localhost

This ensures that name resolution for the localhost does not have to be done over the internet. You can also use the file to block certain websites. To do this, enter the website to be blocked into the list and assign the domain the IP address If you – or perhaps a malicious script – try to call up the locked domain, the browser will check the hosts file first, and find your entry there. Another option is to use the domain name

The browser will then try to access the corresponding website on the server with However, it is unlikely that the browser will be able to locate it, because the requested file will not be there. However, if you have set up your own test server, then the browser may find home.html, but this is just your own file. If you have not set up your own test server, an error message will appear instead of the requested website. This technology can also be used to switch off ad inserts throughout the system. To not have to make every entry manually, you can find finished and regularly extended host files on the Internet.

The hosts file could have a major impact on your security when browsing the internet. Although the file is suitable for blocking malicious websites, criminals can still manipulate it too. You therefore need to make sure that you do not copy entries from other websites without checking them first, and also make sure that malware does not try to make entries without you realizing either.

Related articles

It is important to know your printer’s IP address if you want to connect it to your network or troubleshoot any problems. Your printer’s IP address is kind of like its street addresses. Without it, you can’t send your printer any print jobs or give it any other commands. Here’s how to find your printer’s IP address on a Mac or Windows PC.

How To Find Your Printer’s IP Address From Your Router

It doesn’t matter if you are using aMac or a PC, you can find your printer’s IP address by accessing yourrouter.

  1. Type your router’s local IP address into the address bar of any web browser.
  2. Enter your username and password.
  3. Your printer’s IP address will be under the list of devices connected to the network.

Note: The information will be listed differently depending on your router’s set-up page. Check for words like network map, connected device list, network topology, or other similar terms.

How To Find Your Printer’s IP address in Windows 10

There are a couple of ways to printyour IP address from a Windows 10 desktop or laptop. The easiest way is byfinding it in the Control Panel. Here’s how:

  1. Type “control panel” in the search box. This is the button with the magnifying glass near the Start menu in the bottom-left corner of your screen.
  2. Click on Devices and Printers.
  3. Right-click on a printer and select Properties.
  4. Select the Web Services tab. The IP address should be located at the bottom of Device Information and Troubleshooting Information panels.

If you can’t find your printer in the control panel, you can do a more intensive search by using the Command Prompt. Here’s how:

How To Find Your Printer’s IP Address with Command Prompt

  1. Type cmd in the search box near the Start menu.
  2. Type ipconfig in the command line, then press Enter.
  3. Find your IPv4 address.
  4. In a new command line type ping followed by a space and then your IPv4 address.
  5. Then hit Enter.
  6. After the results load, type arp -a and hit Enter. All dynamic and static connections using the IPv4 address will load.

    Note: If you know your printer’s MAC address or physical address, the internet address which appears beside it will be your printer’s IP address. This 12-digit number can be usually found on the printer or in the printer’s manual.

  7. Open any web browser. You can use Chrome, Firefox, Edge, or any other web browser of your choice.
  8. Copy-paste the dynamic IP address that you got from the arp command. If many addresses appear, paste each address on a different tab.
  9. If the IP opens a printer setup page, that would be your printer’s IP address. The webpage will have the manufacturer’s logo and will display printer information, like the printer status and how much ink you have.

How To Find Your Printer’s IP Address on a Mac

What Is My Localhost Ip

There are two easy ways for you tofind your printer IP address on your Mac desktop or laptop. First, you can findit under System Preferences. You could also find it online using Common UnixPrinting System (CUPS), an open-source printing system for Apple and UNIXdevices.

How To Find Your Printer’s IP Address from System Preferences

  1. Open System Preferences. You can find this in your dock or by going to the Apple logo in the top-left corner of your screen and selecting System Preferences.
  2. Click on Printers and Scanners.
  3. Select a printer from the left column. If you have more than one printer in your network, they will be displayed in a list on the right-hand side of the Print & Scan menu.
  4. Your printer’s IP address will be under Location.
How to check localhost ip location

How To Find Your Printer’s IP Address Using the CUPS Webpage

  1. Open your Applications folder.
  2. Then open Utilities.
  3. Next, open Terminal.
  4. Type cupsctl WebInterface=yes and press Enter on your keyboard. The CUPS web interface will be enabled.
  5. Open Safari.
  6. Type localhost:631/printers into the address bar.
  7. Your printer’s IP address will be in the Location column.

Now that you know how to find your printer’s IP address, the next step is to learn how to add your printer on Mac or Windows 10 desktop or laptop.

How to Find Your Printer’s IP Address Fromthe Network Configuration Page

Almost all printers can print out anetwork configuration page, which will include the printer’s IP address.

If your printer has a user interface(UI) display, the configuration page can generally be printed by going to theSettings or Setup page. Again, the exact steps will vary for differentprinter makes and models.

For example, on an HP LaserJet ProM1212n, you would need to go to the Set-up > Reports > Reports Demo Page >Config Report to print the configuration page.

On the other hand, for CanonimageRUNNER printers, you would need to go to the Main Menu > Settings > Preferences> Network to print out a report. Check your device manual on the exact stepsto follow.

For models without a user interface display, you will need to press and hold a certain button (usually this button is labeled as Power, Go, or in some cases, the Wi-Fi button) for five to 10 seconds to print a configuration page. It’s best to check the printer manual on how you can do this.

Now that you know how to find your printer’s IP address, the next step is to learn how to add your printer on Mac or Windows 10 computer.

Updated on November 6, 2020

How To Check Localhost Ip Settings

Was this article helpful?

Related Articles