There might be various occasions on which you might want to edit your hosts file on windows system.
Anyway, to edit and safe hosts file on microsoft windowsoperating system without error, follow these steps.
1. Right click notepad.exe and select “open as administrator” (find notepad by going in start > all programs )
2. In notepad, click File > Open
3. Goto the hosts file directory on windows: (c:windowssystem32driversetc )
4. Select “All files” from the options if “.txt.” is selected in notepad to show all files in that folder. Select hosts file.
5. Make changes to your hosts file now
6. Save
Done. Your hosts file is now edited successfully and saved.