Windows 7: Hosts File Missing


Hosts file missing Is your hosts file missing? Bummer… well, let’s re-create it.


Host File Location

Windows 95/98/ME: C:\WINDOWS
Windows 2000: C:\WINNT\system32\drivers\etc
Windows XP/Vista/7: C:\WINDOWS\system32\drivers\etc

Re-create hosts file

First look into the folders above to see if you can find any backups or renamed files. If you can’t seem to find any you will have to create it.

1. Open the MyDocuments folder or any other folder without system files.
2. Right-click on the white area and click on New – Text Document

New Text Document

3. Make sure that you can actually see file extensions. Full details here: Show file extensions
4. Rename the file to hosts and remove the file extension .txt
5. If you want to you can copy the default content of the hosts file into the text file, but it is not necessary because the default only includes comments (right-click on file, then Open with – Notepad).

Original content of the Windows hosts file:

# Copyright (c) 1993-2009 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a ‘#’ symbol.
#
# For example:
#
# 102.54.94.97 rhino.acme.com # source server
# 38.25.63.10 x.acme.com # x client host

# localhost name resolution is handled within DNS itself.
# 127.0.0.1 localhost
# ::1 localhost

6. Copy the hosts file to C:\WINDOWS\system32\drivers\etc (Windows 7, XP, Vista)
7. Reboot should not be necessary
8. Flush your DNS

Secure Windows 7

You have now re-created the hosts file. While you’re at it you can secure Windows 7 and add entries to the hosts file to block malware, ads and all the other crap:

Secure hosts file

Secure Windows 7 With Hosts File: Block Malware and Ads


Or you might like these sexy wallpaper, tweaks and themes:

Written by oliversk Saturday, October 23rd, 2010

Was it helpful? Please bookmark it and spread the word

delicious   facebook   google   twitter  

You love Windows, Gaming and everything digital? Great, we too! We have thousands of great Windows 7 themes, registry tweaks, tutorials, so please use our search box if you look for anything specific. If you have some awesome desktop themes, tips or want to write for us, then drop us a mail: win7themes at googlemail.com

Comments are closed.