Share via

Windows7 will not let me edit the hosts file and save it

Anonymous
2010-04-16T18:31:57+00:00

Windows7 will not let me edit the hosts file and save it. What must I do in order to save the edited host file?

Windows for home | Previous Windows versions | Files, folders, and storage

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments
{count} votes
Answer accepted by question author
  1. Anonymous
    2010-04-16T18:47:57+00:00

    It's a built-in safety feature.  There is an easy workaround.  ClickStart ->All Programs -> Accessories.  Right-clickNotepad, and then click Run as administrator.  If you are prompted for an administrator password or for a confirmation, type the password, or clickAllow or Yes.

    Open the Hosts file (from the notepad you just opened) , make your changes, and then click File ->Save

    Barbara

    281 people found this answer helpful.
    0 comments No comments
Answer accepted by question author
  1. Anonymous
    2010-04-16T20:43:01+00:00

    You need to either take ownership of the file (Right click the hosts file, Security tab, and give yourself full rights), or open Notepad as Administrator and open, edit and save your hosts file from there. It's designed that way so some rogue malware can't come in and change that.

    78 people found this answer helpful.
    0 comments No comments

66 additional answers

Sort by: Most helpful
  1. Anonymous
    2017-08-09T13:07:20+00:00

    thanx alot

    0 comments No comments
  2. Anonymous
    2017-04-24T00:50:54+00:00

    Thanks a lot for your help. It worked.

    0 comments No comments
  3. Anonymous
    2017-02-07T08:26:19+00:00

    For those who have windows 10 or aren't able to save properly, where the "Save As" keeps popping up instead of "Save," here is how I was able to get it to work.

    • Drag the "hosts" file to the desktop (Click accept when prompted)
    • Look for Notepad and run as admin
    • Open the "hosts" file
    • Make the changes to the file you wish
    • Click File >Save  (If this works great, if not proceed to the next step)

    Here is the trick to get around it only letting you do "Save As"

    • Select "All Files" instead of "txt file"
    • Change the name as "host." (COPY EXACTLY including the period and the missing "s")
    • After you save drag it back to C:\Windows\System32\drivers\etc\
    • After you click accept, now you can right click and rename
    • Done
    0 comments No comments