How to use Hosts fi...
 
Notifications
Clear all

How to use Hosts file on Windows 10?

(@fix-error)
Member

How to use Hosts file on Windows 10?

The Windows "HOSTS" file and other desktop operating systems were created to provide the system with a local version of the "DNS" system.

How to use Hosts file on Windows 10?

The DNS (Domain Name System) is the global infrastructure behind the operation of the "Web". If you type "Google (.) Com" in the URL address bar, the DNS network gives the correct IP address that your computer needs to access.

Although it works well with "WAN" (Wide Area Network), when it comes to "LAN" (Local Area Network), there can sometimes be problems with the file, preventing the system from being able to connect to others.

The solution is to ensure that if you're looking to develop any kind of LAN functionality, you'll be able to connect to the right systems. This tutorial explains how to do this.

HOSTS File + Local Zone Feature

If you have a local network, you may have added items such as a printer or other source and want to offer users the convenience of using a "domain name."

Since the Internet domain name system isn't really designed for LAN functionality (although you can view the fields in local IP addresses), this is the HOSTS file to make sure you have the ability to track domain names in specific IP.

Unfortunately, this file may get corrupted or there may be incorrect IP addresses stored inside, causing LOCAL network issues.

To make sure that this is not the cause of the problem and that you are able to resolve any issues that may occur, you need to make sure that the HOSTS file is in order.

 

You can do this by following the steps outlined here...

Steps to resolve the HOSTS file

1. Access to the file

The first step is to make sure that the file is accessible and editable.

To do this, you need to be able to charge it, which can be done by following these steps:

Windows 10/8

  • Press the "Windows" + "S" keys on your keyboard
  • Tap on "Notepad", right click on the first list and select "Run as administrator"
  • When the notebook is loaded, click "File" > "Open"
  • Go to "c: Windows System32 Drivers etc."
  • Select the "host" file to open it

Windows 7 / Vista

  • Click "Start" > "All Programs" > "Accessories"
  • Right-click on "Notepad" and select "Run as administrator"
  • From the top menu, select "File" > "Open"
  • Go to "c: Windows System32 Drivers etc."
  • Select the "host" file and open it

2. Remove any false references

The next step is to make sure that the file contains all the correct references inside.

Typically, it should contain a series of "commented" lines (starting with #) followed by a list of IP addresses (xxx (.) Xxx (.) Xxx (.) Xxx) and domain names ( x (.) Com).

Lists in a "healthy" HOSTS file should simply have commented lines; if there are others, you will need to make sure that they are listed correctly (most likely for some applications on your system).

The only time it would be damaged is if your system has ever had a virus (which often dilutes the "HOSTS" file with fake websites).

If you don't have the /IP fields listed – this may suggest a lack of links, which I will explain in the next paragraph.

3. Make sure the correct IP addresses are added

Once you have entered the HOSTS file, you need to make sure that all the IP addresses on your local network are listed correctly.

 

For example, we had a printer that we used to access via // Printer-1.

Unfortunately, the printer was damaged, which led us to buy another one. This new printer changed its name and thus became inaccessible to 90% of the network.

The way to solve this problem was to simply change the IP address of the printer in the HOSTS files of our different network systems.

This not only allowed us to redirect the various requests to the new printer, but also to ensure that we correctly executed the HOSTS files in the system.

If you do this – and then close the file after saving it – you'll need to restart for the changes to take effect.

Quote
Topic starter Posted : 14/08/2022 12:02 am
Share: