Windows 7: hosts file deleted - what to do?
This guide shows you what you can do if you have accidentally deleted the hosts file in Windows 7.
Restore hosts file under Windows 7 - how it works
Once you've deleted the hosts file, you can easily create a new one. To do this, follow the steps below.
- Change to the directory Windows / System32 / Drivers / etc on your computer.
- Right-click the "New" button to create a new text document.
- Name the file "hosts" without using an extension.
- Copy the following text from step 5 into the created file and then save it.
- # Copyright (c) 1993-2006 Microsoft Corp. # # This is a sample host file used by Microsoft TCP / IP for Windows. # # The file contains the assignments of the IP addresses to host names. Each # entry should be on a separate line. The IP address should # be written in the first column, followed by the corresponding host name. # The IP address and host name should be separated by at least one # space. # # Comments (like this) can also be written on individual # lines or inserted after the computer name, indicated by a '#' symbol. # # For example: # # 102.54.94.97 rhino.acme.com # source server # 38.25.63.10 x.acme.com # x client host
- You may be prompted for an administrator password. Enter it and click "Continue".
- Alternatively, you can have the hosts file created automatically using the Fixit tool from Microsoft.
This practical tip is based on Windows 7. You can find out how to enlarge the preview of the Windows taskbar in the next practical tip.