Windows 10 No Intranet/LAN Connection (HOSTS File Fix)

The “HOSTS” file of Windows, and other desktop operating systems, is designed to provide the system with a local version of the “DNS” system.

DNS (domain name system) is the global infrastructure which lies behind the way the “web” works. If you type “Google (.) com” into URL address bar, the DNS network delivers the correct IP address for your computer to access.

Whilst this works well with the “WAN” (Wide Area Network), when it comes to the “LAN” (Local Area Network), there can sometimes be issues with the file, preventing the system from being able to connect to others.

The solution is to ensure that if you’re looking at developing any sort of local network functionality, you are able to connect to the right systems. This tutorial explores how to do this.

HOSTS File + Local Network Functionality

If you have a local network, it can be the case that you’ve added the likes of a printer or some other resource, and want to give people ease-of-access by way of a “domain name”.

Since the domain name system of the Internet isn’t really designed for LAN functionality (although you can point domains to local IP’s), it comes to the HOSTS file to ensure that you have the ability to route domain names to specific IP’s.

Unfortunately, it can be the case that this file either becomes corrupted, or doesn’t have the correct IP addresses stored within it – causing issues with the LAN.

To ensure this is not the cause of the problem, and that you’re able to solve any of the issues which may be surrounding it, you need to ensure the HOSTS file is okay.

You can do this by following the steps outlined here…

HOSTS File Solution Steps

1. Access The File

The first step is to ensure that the file is both accessible and editable.

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

Windows 10 / 8

  • Press “Windows” + “S” keys on your keyboard
  • Type “Notepad”, right-click the first listing and select “Run As Administrator”
  • When Notepad loads, click “File” > “Open”
  • Browse to “c:\Windows\System32\Drivers\etc”
  • Select the “hosts” file to open it

Windows 7 / Vista

  • Click on “Start” > “All Programs” > “Accessories”
  • Right-click on “Notepad” and select “Run as Administrator”
  • From the top menu, select “File” > “Open”
  • Browse to “c:\Windows\System32\Drivers\etc”
  • Select “hosts” file and open it

2. Remove Any False References

The next step is to ensure the file has all the correct references inside.

Typically, it should contain a series of “commented” lines (which start with #) followed by a list of IP addresses (xxx(.)xxx(.)xxx(.)xxx) and domain names (x (.) com).

The listings in a “healthy” HOSTS file should simply have the commented lines; if there are any others, you’ll need to ensure that they are correctly listed (they’re likely from some applications on your system).

The only time that 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 any listed domains/IP’s – it could suggest a lack of connectivity which I’ll explain in the next paragraph.

3. Ensure The Correct IP’s Are Added

Once inside the HOSTS file, you need to ensure that any of the IP’s for your LAN are correctly listed.

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

Unfortunately, the printer had become damaged, leading us to buy another. This new printer changed its name and thus became inaccessible to 90% of the network.

The way to fix this was to simply change the IP address of the printer in the HOSTS files of our various networked systems.

This not only allowed us to re-route the various requests to the new printer, but also ensured that we were running the HOSTS files correctly inside 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.

Leave a Reply