How to fix the hosts file on Windows 10

Sometimes, for some reason, you need to edit the host file on your computer, but you cannot edit because when saving the host file, you don't know how to open the host file…. If you do not know how to edit the host file on Windows, then you please

Sometimes, for some reason, you need to edit the host file on your computer, but you cannot edit because when saving the host file, you don't know how to open the host file…. If you do not know how to fix hosts file on Windows, please refer to the following article. The article details you how to fix hosts file on Windows 10.

How to fix the hosts file on Windows 10 Picture 1How to fix the hosts file on Windows 10 Picture 1

Step 1: Open the etc folder containing the host file

Method 1: Click This PC to open File Explorer , then navigate to the etc folder under the path C: WindowsSystem32driversetc.

How to fix the hosts file on Windows 10 Picture 2How to fix the hosts file on Windows 10 Picture 2

Method 2: Press Windows + R to open the Run dialog box, enter the keyword C: WindowsSystem32driversetc into Run and click OK to open the folder etc.

How to fix the hosts file on Windows 10 Picture 3How to fix the hosts file on Windows 10 Picture 3

Method 3: Open the host file with Searchbox under the taskbar, click Searchbox and enter the keyword C: WindowsSystem32driversetc then select the search results, etc folderwill be opened.

How to fix the hosts file on Windows 10 Picture 4How to fix the hosts file on Windows 10 Picture 4

Step 2: Open the host file with notepad

Right-click on the host file -> Open in Notepad.

How to fix the hosts file on Windows 10 Picture 5How to fix the hosts file on Windows 10 Picture 5

The host file will display as shown below:

How to fix the hosts file on Windows 10 Picture 6How to fix the hosts file on Windows 10 Picture 6

Step 3: Edit the host file

To map a domain, just add a line based on the example below starting with the IP address, to the space, then the domain name. If you want to block the website, redirect to 127.0.0.1. If you do not want that line to take effect, put the # before the line. For example, you add a host segment as follows:

How to fix the hosts file on Windows 10 Picture 7How to fix the hosts file on Windows 10 Picture 7

Step 4: Save the host file

After you have finished editing you press Ctrl + S to save the file and turn off Notepad .

How to fix the hosts file on Windows 10 Picture 8How to fix the hosts file on Windows 10 Picture 8

If you can not save the hosts file directly, you do the following:

Go to the etc directory as above, copy the hosts file to any location (for example the desktop), then perform the same steps as above for the hosts file on the desktop (open the hosts file with Notepad and edit, save the host file ). Then you copy the host file on the desktop and paste it into the etc folder, a message appears that the host file exists, select Replace the file in the destination to overwrite the old hosts file.

How to fix the hosts file on Windows 10 Picture 9How to fix the hosts file on Windows 10 Picture 9

Above the article has instructions on how to fix the host file on Windows 10, with Windows 7 you do the same or you can refer to the detailed tutorial here http://TipsMake.vn/cach-sua -file-host-config-file-host-doc-mo-file-host /

Good luck!

5 ★ | 1 Vote