0
Home  ›  Windows

How to Fix the Hosts File Not Saving After Editing in Windows 10/11

"Learn how to fix the hosts file not saving after editing in Windows 10/11, including when Save As appears while trying to save changes"


Do you often edit the hosts file in Windows to add, modify, or remove certain lines, but find that you can't save the file after making your changes? This problem can be quite confusing, especially if you're editing the hosts file in Windows for the first time.

For example, you've finished adding or removing lines in the hosts file and then try to save your changes as usual, however, instead of saving the changes to the hosts file you're currently editing, Windows displays a Save As dialog box and asks you to save the file as a new file.

As a result, you might end up with a new file with a different extension or feel confused because the original hosts file remains unchanged, even though all you wanted to do was edit the existing hosts file and save your changes as usual.

This can happen because the hosts file is one of the Windows system files stored in a system folder with specific permission settings, as a result, editing and saving this file doesn't always work the same way as editing a regular text file.

However, there's no need to worry because there's actually a fairly easy way to fix this problem, in this tutorial, I'll show you the steps you can take to edit and save the hosts file again without constantly being redirected to the Save As dialog box.

So, if you're having trouble saving the hosts file after editing it, just follow the tutorial below.

Tutorial:

  1. First, make sure you're in the etc folder, where the hosts file is located, if you're not there yet or aren't sure where to find it, you can open the folder by following the path below :

    Local Disk (C:) → Windows → System32 → drivers → etc

  2. Inside the etc folder, you'll find a file named hosts, if you see two files named hosts, make sure you open the one without a file extension (the file type should simply appear as File).


  3. Once you've found it, move the hosts file to your desktop first.



  4. If a UAC dialog box suddenly appears, click the Continue button.
  5. Next, on your desktop, right-click the hosts file and select Properties.



  6. In the Properties window, make sure the Read-only checkbox is unchecked, if it's checked, uncheck it, then click Apply followed by OK button.







  7. You can now open and edit the hosts file as usual using Notepad, and you should also be able to save any lines you've added directly to the hosts file.





  8. After editing the hosts file, right-click it again, select Properties, and check the Read-only box again, then click Apply followed by OK button..
  9. Next, move the hosts file back to its original location
  10. That's it, you're all set!


Final Thoughts


That concludes this tutorial on how to fix the hosts file not saving after editing on a Windows laptop or computer, by moving the hosts file to the desktop, temporarily disabling the Read-only attribute, and then editing and saving it again, you can make changes without constantly being redirected to the Save As dialog box.

After making your changes, don't forget to enable Read-only again and return the hosts file to its original folder to restore its previous file settings.

I hope this tutorial helps you resolve any issues you're experiencing when trying to edit and save the hosts file in Windows
Post a Comment
Additional JS