DetailPage-MSS-KB

Microsoft small business knowledge base

Article ID: 972034 - Last Review: November 1, 2013 - Revision: 11.0

Summary

This article helps you reset the Hosts file back to the default.

To have us reset the Hosts file back to the default for you, go to the "Fix it for me" section.

Note You cannot use the Fix it solution in Windows 8.

To reset the Hosts file back to the default yourself, or to reset the Hosts file in Windows 8, go to the "Let me fix it myself" section.

Fix it for me

To reset the Hosts file back to the default automatically, click the Fix it button or link, click Run in the File Download dialog box, and then follow the steps in the Fix it wizard.
Collapse this imageExpand this image
Fix this problem (http://go.microsoft.com/?linkid=9668866)
Microsoft Fix it 50267
Collapse this imageExpand this image

Collapse this imageExpand this image
Notes
  • This wizard may be in English only. However, the automatic fix also works for other language versions of Windows.
  • You cannot use the Fix it solution in Windows 8.


Collapse this imageExpand this image
Note If you are not on the computer that has the problem, you can save the automatic fix to a flash drive or to a CD and then run the automatic fix on the computer that has the problem.

Next, go to the "Did this fix the problem?" section.

Let me fix it myself

To reset the Hosts file back to the default, follow these steps, as appropriate for the operating system that you are running

Windows 8
  1. Open Notepad. To do this, swipe in from the right edge of the screen, tap Search, type Notepad, and then tap the Notepad icon. Or, if you are using a mouse, point to the upper-right corner of the screen, move the mouse pointer down, click Search, type Notepad, and then click Notepad.
  2. Copy the following text, and then paste the text into the 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
  3. On the File menu, tap or click Save as, type "hosts" in the File name box (as displayed in the following image), and then save the file to the desktop.
    Collapse this imageExpand this image
    The screenshot for this step
  4. Open the %WinDir%\System32\Drivers\Etc folder. To do this, follow these steps:
    1. Swipe in from the right edge of the screen, tap Search, type run, and then tap the Run icon. Or, if you are using a mouse, point to the upper-right corner of the screen, move the mouse pointer down, click Search, type run, and then click the Run icon.
    2. Type %WinDir%\System32\Drivers\Etc in the Open box, and then tap or click OK.
  5. Select the Hosts file, tap or click Rename, and then rename the file as "Hosts.old".
  6. Copy or move the Hosts file that you created in step 3 to the %WinDir%\System32\Drivers\Etc folder. If you are prompted to enter an administrator password, tap or click Continue.
Windows 7 and earlier versions of Windows
  1. Click Start, click Run, type Notepad, and then click OK.
  2. Copy the following text to the file:

    For Windows XP or for Windows 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
    For Windows Vista or for Windows 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 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
  3. On the File menu, click Save as, type hosts in the File name box, and then save the file to the desktop.
  4. Click Start, click Run, type %WinDir%\System32\Drivers\Etc, and then click OK.
  5. Select the Hosts file, and rename it "Hosts.old." 
  6. Copy or move the Hosts file that you created in step 3 to the %WinDir%\System32\Drivers\Etc folder. If you are prompted to enter an administrator password, click Continue.

Did this fix the problem?

Check whether the problem is fixed. If the problem is fixed, you are finished with this article. If the problem is not fixed, you can contact support (http://support.microsoft.com/contactus) .

Applies to
  • Windows 7 Enterprise
  • Windows 7 Home Basic
  • Windows 7 Home Premium
  • Windows 7 Professional
  • Windows 7 Starter
  • Windows 7 Ultimate
  • Windows Vista Enterprise 64-bit Edition
  • Windows Vista Home Basic 64-bit Edition
  • Windows Vista Home Premium 64-bit Edition
  • Windows Vista Ultimate 64-bit Edition
  • Windows Vista Business
  • Windows Vista Business 64-bit Edition
  • Windows Vista Enterprise
  • Windows Vista Home Basic
  • Windows Vista Home Premium
  • Windows Vista Starter
  • Windows Vista Ultimate
  • Microsoft Windows XP Home Edition
  • Microsoft Windows XP Professional
  • Microsoft Windows Server 2003, Web Edition
  • Microsoft Windows Server 2003, Enterprise x64 Edition
  • Microsoft Windows Server 2003, Enterprise Edition (32-bit x86)
  • Microsoft Windows Server 2003, Standard x64 Edition
  • Microsoft Windows Server 2003, Standard Edition (32-bit x86)
  • Windows Server 2008 Datacenter
  • Windows Server 2008 Enterprise
  • Windows Server 2008 Standard
  • Windows 8
  • Windows 8 Pro
  • Windows 8 Enterprise
Keywords: 
kbexpertisebeginner kbsurveynew kbmsifixme kbfixme KB972034
Share
Additional support options
Ask The Microsoft Small Business Support Community
Contact Microsoft Small Business Support
Find Microsoft Small Business Support Certified Partner
Find a Microsoft Store For In-Person Small Business Support