Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I would like to add an address to the hosts file. I am running Windows 7 (Hebrew edition), and I am the system administrator.

I have tried the command notepad C:\Windows\System32\drivers\etc\hosts to edit the file. I can write into the file but the system does not allow me to save the file.

How can I save the file with my additions? What is the correct format for this type of file?

Also, all lines in the existing file begin with "#". Does this mean anything?

share|improve this question
# before an entry means it is a comment. The entries will be active only after removing #. – Ankit Mishra Dec 8 '12 at 13:45

Although you are the system administrator, Windows 7 by default runs your program with reduced permissions.

To be able to update the protected hosts file, you should start notepad with the "Run as administrator" option, even if you are the administrator.

You can turn off this behavior by disabling UAC, but the cure may be worse than the problem.

share|improve this answer
If you have UAC enabled, another quick way in Windows 7 is to press the Windows key, type notepad, hold down SHIFT+CTRL and hit Enter. That will start it elevated and allow you to save the changes. – Kez Jan 5 '11 at 20:03
  • Go to the shortcut for Notepad in your Start menu.
  • Right click the Notepad icon. Select Run as administrator
  • When Notepad is loaded open the file C:\Windows\System32\drivers\etc\hosts
  • Edit, and save the file
  • Your Hosts file is edited

You have to run it as Administrator because Win7 will automatically run programs with reduced permissions

*There are of course 101 more ways to do this, this is just one of them.

share|improve this answer

Here's the simplest way to do it:

Press the start button, paste notepad C:\Windows\System32\drivers\etc\hosts, then press Ctrl+Shift+Enter. In fact, you can run any application/command as an admin this way.

share|improve this answer

there is a very easy and simple fix here.... sounds to me like you are trying to bypass a register.. i have done the same myself ;-)

  1. copy the hosts file to your desktop
  2. edit and save the file to your desktop
  3. delete original file location or change name (i add "_bu" to the name just in case)
  4. copy file from desktop into original folder


share|improve this answer

You must log in to answer this question.

protected by slhck Feb 11 '14 at 17:52

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged .