How to Edit Host File in Window 7
Tue Jun 24, 2014 10:46
As you would know, some of the Windows 7 users can’t save the host file how they like it. The host file itself will simply vanish what the user had done with it.
For those users who experience this problem, here are the instructions to fix it.
First of all, you should have the administrative privileges to edit the host file. In normal case, if an admin user directly go to the host file in system 32 and add his preferences and then save it, it should keep the changes. However, in some wicked scenarios, it will not.
So, here you go with a correct solution for this problem.
Note: If you are not comfortable with Windows OS and don’t know what you are doing, this process can mess up things. Hence, do not attempt if you are not 100% sure you can make it.
Login to an administrator account.
In the run command (Windows key + R) type, “control folders” and hit enter.
Click on the tab called view.
Select the radio button for Show hidden files, folders and drivers –ON.
Uncheck the ‘Hide extension for known file types-ON
Click on Apply and then OK.
Type “drivers” in run command and hit enter. It will take you to where the folder “drivers” located in System 32.
From the “drivers” folder, double click the folder named “etc.”
Now you can see the “host” file along with others.
Now, in the search area in start menu, type “notepad.exe” and open the notepad.exe as administrator. (In order to do this, you can right click on the notepad.exe shown and select “Run as Administrator.” If UAC prompted, click YES/OK)
Now, you will have a notepad open with administrative privileges.
At the top left side of the notepad click on “file” and then select “Open.”
A box will appear which will allow you select the file to open. Carefully, navigate to the location where the “host” file is located. To do that, select the drive where you installed Windows. If you have the Windows installed in C: select ‘Local Disk (C ’ > Windows > System 32 > drivers > etc. At this point, you might not have another option to proceed or select from. The window would be empty. To proceed further, select the option “All files” from the drop down menu which is located above the “Open” and “Cancel” button. You can now see all the files located in etc folder.
Select “hosts” from the menu and click on “Open.” Note: You can either click on open or double click on the file.
Now, you will have the host file information open in the notepad which you had already initiated before with administrative privileges.
Make whatever changes you as you wish. (Example: If you need to block a web site called www.block123.com you can type 127.0.0.1 www.block123.com right under the local hosts. Make sure you do not change any other letters or characters which are already saved in host file. This will completely mess up your computer. For more information on the information about host file, refer the Microsoft web site: http://support.microsoft.com/kb/972034 . If you have accidently delete/edit anything from host file, please delete the complete information stored in host file and copy and paste the host file information from Microsoft which is appropriate for your Operating System.)
Click on “file” again and select “Save as” and save it in etc. If the path is showing correct to etc folder, save it to etc. If it is navigated to somewhere else, follow the instructions provided above and select etc folder and then save it.
Now, go back to the actual host file location which is in System32 > Drivers > etc (You would have it already open if you had followed the instructions just like the way I have provided)
There you can see 2 host files. One which has already been there and the other one you just saved.
Among the two, one is called “hosts” and the ‘type’ would be ‘file.’ This is the original host file. The other which you have just saved will be named as “hosts.txt” with the file type as ‘Text Document.’
Right click on the original host file and select rename. You can even click on that file and press F2. This will enable the option to rename the file. Rename the original host file as “hostold” and hit enter.
Now, select the second host file which we have saved as a text document and rename it as “hosts.” Make sure that you DELETE the .txt file extension in order to change the type “Text Document” to “File” and hit enter.
Now, you have successfully saved the host file with your preferences.
You can now delete the file which we renamed as “hostold.”
We are done. You would need to do this process all over if you need to edit the host file again. I know it is difficult, however, it is our own requirement and we have to invest few minutes on this.
Enjoy your computer with a great feeling that you have finally edited the host file as per your wish and take it from here. Wish you luck.
Wednesday, August 08, 2012 1:49 AM
Need I say more?