How to Reset Hosts File | XP | Vista | Windows 7

Bookmark and Share

Trouble removing this virus? Try Spyware Doctor With Antivirus from PCTools. »Download

Online Virus Removal Guaranteed online virus removal service or you don't pay: www.OnlineComputerRepair.org

This article describes how to re-set the hosts files for Windows XP, windows vista and Windows 7.

Please note a tool has been created from Microsoft to automatically do this for you. Download Here . We recommend you just use the auto tool in most cases.

To reset the hosts file back to the default, follow these steps:

1. Click Start, click Run, type %systemroot% \system32\drivers\etc, and then click OK. You can also open up the My Computer Icon and browse to the location.

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

2. Rename the hosts file to hosts.bak.  To re-name the file you right click on it ans select rename.  You can also just change the file to hostsOLD or something like that.

3. Create the new default hosts file. To do this, follow these steps:

1. Right-click an open space in the %WinDir%\system32\drivers\etc folder, point to New, click Text Document, type hosts, and then press ENTER.

2. Click Yes to confirm that the file name extension will not be txt.

3. Open the new created hosts file in a text editor, for example, in the Notepad.

4. Copy the following text to the file. Keep in minde that everything that follows the  # symbol is null and it does not really matter:

For Windows XP

# 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.

#

127.0.0.1 localhost

For Windows Vista

# 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.

#

127.0.0.1 localhost

::1 localhost

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.

#

# localhost name resolution is handle within DNS itself.

# 127.0.0.1 localhost

# ::1 localhost

5. Save and close the file.

Virus Removal

1 comment for "How to Reset Hosts File | XP | Vista | Windows 7".

Anonymous's picture

1. Agreement

Thank you very much for your article.

Post new comment

The content of this field is kept private and will not be shown publicly. If you have a Gravatar account, used to display your avatar.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Image CAPTCHA
Enter the characters shown in the image.
Syndicate content