How to Add a Line to Windows Host Files

The Windows host file is a text file used on Windows platforms for DNS purposes; the file is used to translate host-names to IP addresses. The host file is in your system root's system32/drivers/etc folder. You can edit the file using notepad. Many virus writers also create viruses that can get into your system and edit the file to prevent a user from downloading security programs from the Internet to remove their viruses.

...

Step

Go to “Start” and type “%SystemRoot%\system32\drivers\etc\” and hit “Enter.” This will open the “etc” folder with a group of listed files.

Step

Double-click on the “Host” file. This action should prompt you to pick an application with which to open the file.

Step

Choose to open the file with “Notepad” and click “OK.” This will open the content of the file in Notepad.

Step

Look for the “127.0.0.1 localhost.” Position your cursor at the end of this line and press “Enter.”

Step

Enter your new line. An example would be: “123.45.67.89 mywebsite.com.”

Step

Once you have added your line. Go to “File” and “Save” the file.

Step

Close Notepad.