How to Edit Hosts file in Windows:

Host file is a system file used by the operating system to map host names to IP addresses.

This article will help to edit hosts file in windows.

Step 1: Open C:\Windows\System32\drivers\etc or go to run and type C:\Windows\System32\drivers\etc click on OK.

HostfileStep 2: A folder will open where you can see hosts file, right click on host file ->select Open.

Hostfile1Open your hosts file using Notepad.

Hostfile2Step 3: Now your host file will open in notepad as shown below.

Hostfile3Once notepad is opened you can edit the file, in this example I am blocking Google, to do this you need to add the following code below the # mark

Hostfile4Step 4: After editing host file click on save button to save changes.

Hostfile5Step 5: If you get a warring message while saving the hosts file saying that you don’t have permission to edit host file.

Hostfile6Change the properties of the hosts file. To change go to properties of hosts file.

Hostfile7Go to security tab.

Hostfile8Click on Edit button, to change permissions to edit hosts file.

Hostfile9Select your user name.

Here my user name is Imperio 15-PC.

Hostfile10Select Full Control check box under permissions for users.

Hostfile11Click on Ok, then you will get a message as shown below, click on Yes .

Hostfile12Now you can edit Hosts file repeat the Step 2 & Step 3 to edit your host file.

That’s it.

Enjoy 🙂

Thank you for visiting  If you find any mistakes help us by leaving a comment.

Don’t Miss : How to Block Facebook Website on your Computer.