====== WINDOWS ======

In Windows 7, 8, and 10, you can’t save edits to the HOSTS file unless you open it directly from Notepad or another text editor. To do so:

  1. Open Notepad or another text editor like Notepad++.
  2. In the text editor, select File > Open and open the HOST file location at C:\Windows\System32\drivers\etc\.
  3. Select Text Documents (*txt) in the bottom-right of the Open window and change it to All Files.
    Note important:This step is required because the HOSTS file doesn’t have the .TXT file extension.
  4. When files appear in the folder, double click hosts to open it.
  5. Edit the HOSTS file and save your changes. Finish

====== MAC OS======