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

If for some reason, you wish to reset 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.

If you have liked this post, you might want to check out some more, on topics like , .

About AnandK@TWC

Anand aka HappyAndyK is an end-user Windows enthusiast, a Microsoft MVP in Windows Desktop Experience since 2007, and the Admin of TheWindowsClub.com, TheGeeksClub.com & WinVistaClub.com. Creating a System Restore Point before trying out a new software or a tweak is always recommended.
Follow on Google: +AnandK@TWC

Ads

Random Posts

  • whatdoesitwant

    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?

  • david

    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.

  • http://www.thewindowsclub.com/ Windows Club

    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 .

© 2012 The Windows Club All Rights Reserved