Windows 7: Edit Hosts file - how it works
If you want to edit a Hosts file in Windows 7, it is only possible with the right permissions. The file can be found inside the Windows system folder, but it cannot be modified directly. If you would like to edit the Hosts file nevertheless, this is connected with some steps.
How to edit the Hosts file in Windows 7
To edit a Hosts file, you first need administrator privileges. "Hosts" can be found via the path "C:\Windows\System32\drivers\etc". However, first you need to right-click the Windows editor and select "Run as administrator" from the drop-down menu. Then you can open and edit the Hosts file.- For this, press the key combination "Ctrl" + "O" within the editor or open it via "File" > "Open".
- The file is located in the above path and can be selected and opened with a double click.
- Inside the file are lines that are marked with a # sign. These are comments that are for explanation purposes only. You can add as many comments as you like.
- If you add a new entry, first write the IP address at the beginning.
- Then follow a space and the hostname.
- Um beispielsweise den Netzverkehr zu einer Domain zu blockieren, schreiben Sie „127.0.0.1 name.de“. name.de wird mit dem Namen der Webseite ersetzt.
- Sobald Sie die Änderung vorgenommen haben, können Sie sie abspeichern und schließen.