How to set the Windows 7 hosts file back to default.

June 18th, 2009 . Filed under: Security. Tags: ,

If for some reason, you wish to re-set your Windows 7 Hosts file situated at C:\Windows\System32\drivers\etc you can follow these steps:

Click Start and type copy-paste in start search : %systemroot% \system32\drivers\etc and hit Enter.

If you are using 64 bit version of Windows, type %systemroot% \SysWOW64\drivers\etc.

Rename the hosts file to hosts.bak.

Next, create a new default Hosts file.

To do so, open a new Text file named hosts in the folder %WinDir%\system32\drivers\etc folder.

Copy-paste the following text into the notepad file:

# Copyright (c) 1993-2006 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 handle within DNS itself.
#       127.0.0.1       localhost
#       ::1             localhost

Save the text file.

Addl Read : How to lock down your Hosts file.



Bookmark and Share

Related posts:

Recent posts:
  • Microsoft’s Atlas and Interpublic Group Ink Ad Deal
  • Microsoft launches Child-safe Internet Explorer
  • Icelandic, Welsh Windows 7 Language Interface Packs now available
  • Download IbarraReal Font for Windows 7 & Vista from Microsoft
  • Troubleshooting the Windows 7 Troubleshooters

  • Popular posts:

    Comments

    By whatdoesitwant on July 10th, 2009 at 3:36 PM

    I checked, but on my windows 7 RC build 7100 hosts does not live in %systemroot% \SysWOW64\drivers\etc.
    It does exist in %systemroot% \system32\drivers\etc however.

    Am I correct to assume that I should no longer set up my localhost aliases in the hosts file but rather directly in the dns client of the Microsoft Management Console (gpedit). If so, how?

    i think it’s not good solution because host file is configure as default setting. Rename host file may be crash system. My good solution is

    1. Open Notepad with Administrative privileges by clicking Start, All Programs, Accessories, and then right-click Notepad and select to open as Administrator.
    2. Now that Notepad is open with Administrative privileges browse to (C:\Windows\System32\drivers\etc) in Notepad and open the hosts file.

    You can set up localhost aliases in the hosts file.

    In x86, Hosts file is situated in %systemroot% \system32\drivers\etc folder.

    This is the recommended way to set the Hosts file to default.

    Incidentally, there is now also a ready FixIt solution from Microsoft here: http://support.microsoft.com/kb/972034 .

     

    Leave a Comment




    • Microsoft MVP



    • RSS Feed Subscribe e-mail newsletter Twitter

    • Recommended Software

    • Discussions @ TWC Forum