How to Reset Hosts File to Default in Windows XP, Vista and 7?

"Hosts" file is an important system file in Windows which maps hostnames to IP addresses. Its a simple text file which is stored in "%windir%\System32\drivers\etc\" folder in Windows NT, 2000, XP, Server 2003, Vista, Server 2008 and Windows 7 32-bit editions. In 64-bit editions, it might be also stored in "%windir%\SysWOW64\drivers\etc\" folder.

The hosts file's structure is very simple. It contains text lines containing IP address followed by the hostname.

Sometimes this hosts file is hijacked by viruses, adware, spyware or trojan horse software and is modified to redirect your web browser to various websites containing malicious code. It might also block security websites and Windows Update website in your system so that you can't install security updates and virus definitions in your operating system.

If you are also facing a similar problem, you should check the hosts file and make sure it contains the default values. To reset hosts file to default, you can follow these simple steps:


1. Type following in RUN or start menu searchbox and press Enter:

         %windir%\System32\drivers\etc\

2. Now you'll see a file with the name hosts in etc folder.

3. Open the file in Notepad and replace its content with following text:

For Windows 7:



   # 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

For Windows Vista and Server 2008:


    # 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


    127.0.0.1 localhost
    ::1 localhost


For Windows XP and Server 2003:


    # Copyright (c) 1993-1999 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


    127.0.0.1 localhost

4. Save the file and you have reset the file to default.

NOTE: If you don't want to do it manually, you can download an automatic Fixit tool released by Microsoft to reset Hosts file to default:

Download Automatic Fixit to Reset Hosts File to Default
Share this post
  • Share to Facebook
  • Share to Twitter
  • Share to Google+
  • Share to Stumble Upon
  • Share to Evernote
  • Share to Blogger
  • Share to Email
  • Share to Yahoo Messenger
  • More...

0 comments

 
© 2014 Win Genuine
Designed by Theenathayalan
Posts RSSComments RSS
Back to top