
Change the hosts file with the editor under Windows
If you have opened the editor as an administrator, you can get down to business: editing the hosts file.
- Within the editor, press and hold the Ctrl key and "O". Alternatively, you can also go to "File" and then "Open...".
- In the newly opened window, navigate to C:WindowsSystem32driversetc. Make sure that "All files (*.*)" and not "Text files (*.txt)" is selected at the bottom right so that the hosts file is also displayed.
- You will find the “hosts” file in the “etc” folder. If you have opened the hosts file, you will see some English-language comments preceded by the # symbol at the beginning of the line. With the double cross you can also write comments and notes that only serve as information for you.
- If you would now like to add a new entry, it is best to do so below the comments. Each entry should be on a separate line. At the beginning of the line write the IP address and behind it, separated by at least one space, the associated host name.
- If you want to block all network traffic to a specific domain using the hosts file, use "127.0.0.1" as the IP address. Example: If you enter the line "127.0.0.1 google.com ", access to google.com will be blocked. For example, you can no longer navigate to the page in the browser .
- Once you have edited the hosts file as desired, press and hold the Ctrl key and "S" on the keyboard in the editor window to save the changed Windows file.