-->

How to Fix Empty Hosts File

What is hosts file?

The hosts file is used by the operating system to convert human-friendly hostnames into numerical Internet Protocol (IP) addresses that identify and locate a host on an IP network.

edit hosts file, empty hosts file, hosts file, hosts files

Microsoft has kept the hosts file alive on Windows networks, so it changes little whether it’s used on Windows, macOS, or Linux. The syntax remains mostly the same across all platforms. Most hosts files have several entries for loopback. We can use this as a basic example for typical syntax.

The first part will be the location to which the address will be forwarded, the second part will be the address you want to forward and the third part will be the comment. They can be separated by a space, but are typically separated by a tab or two for ease of reading.

How to Repair Empty Hosts File?

Press the Windows key. Type Notepad in the search field. Right-click Notepad in the search results and select Run as administrator. Open the following file from Notepad: c:WindowsSystem32Driversetchosts. Required changes to the file.

Copy and paste:

# Copyright (c) 1993-2006 Microsoft Corp. # # This is a sample HOSTS file used by Microsoft TCP/IP for Windows. # # This file contains mappings of IP addresses to hostnames. Each # entry should be kept on a separate line. The IP address should be placed # in the first column followed by the corresponding hostname. # The IP address and hostname must be separated by at least one # space. # # In addition, comments (like these) can be added on individual # lines or after the machine name with the ‘#’ symbol. # # For example: # # 102.54.94.97 rhino.acme.com # source server # 38.25.63.10 x.acme.com # x client host # localhost name resolution is handled within DNS itself. # 127.0.0.1 localhost # ::1 localhost

6. Choose File > Save to save your changes.

NEXT ARTICLE Next Post
PREVIOUS ARTICLE Previous Post
NEXT ARTICLE Next Post
PREVIOUS ARTICLE Previous Post