Host file is a file inside windows operating system which is used for mapping host names to ipaddress. Editing host file is done rarely, unless you have an issue with the host file. Malware programs often attack host file to make the web browsers redirect to malicious websites or ipaddress. In such cases, it becomes important to edit host file to get rid of these suspicious entries. In this tutorial, you will learn how to make changes or edit host file.
Location of Host file
The host file is located in the same folder in WinXP, Vista and Win7 . You can directly open the file from the location C:\Windows\System32\Drivers\Etc.
You can also open the location by entering the location in “Run” window
Click Start -> Run -> type %systemroot%\system32\drivers\etc\
How to open and make changes in Host file
Right click on host file -> Open -> Select Notepad ->Click OK.
This will open host file using a notepad. You can now start making changes.
How to save the changes made on Host file?
If you are logged in as an administrator user in WinXP, there are no additional steps. Just open the host file using notepad, save the changes normally as you usually do in notepad.
Vista and Win7 won’t allow making changes to host file because of the additional security provided to these files. Even if you are logged in as an administrator user, you still need to open the file with admin rights to make the changes.
- Right click on Host file
- Click Open
- Select “Run as Administrator”
Now you should be able to save the changes made on the file.
If you try to make changes without administrator rights, you might end up with a message as shown below.