Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How do I reset my hosts file back to default?

Windows 7 Ultimate 32bit


share|improve this question
up vote 6 down vote accepted

Default hosts file configuration for Windows 7 from Microsoft Support: How can I reset the Hosts file back to the default?

# 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:
#          # source server
#              # x client host

# localhost name resolution is handle within DNS itself.
#       localhost
#       ::1             localhost
share|improve this answer
nice one Jin, one more question, what if I've deleted my hosts file completely? Any idea how to create a new one? Say go to Notepad, add this piece of info you gave, now what extension should i save it? – Random Guy Oct 7 '11 at 8:17
@V413HAV No extensions, filename is simply hosts. See step 3 in the link I've attached. – Jin Oct 7 '11 at 8:20
Cool Buddy :) :) – Random Guy Oct 7 '11 at 8:21
All lines starting with # are simply ignored, so you might as well leave the file empty. – grawity Oct 7 '11 at 8:25
and set it to read only just for fun. – Psycogeek Oct 7 '11 at 8:26

Microsoft has created an automatic fix for this certain problem. If you want to try and fix it manually here are the steps how:

  • Type this in the Run window (click Start > Run):


    (where system root is your default main root folder, usually C:).

  • Change the name of the hosts file to hosts.old

  • Open Windows Explorer and go to the %WinDir%\System32\Drivers\Etc folder (WinDir is your Windows directory)
  • Create a new text document, name it hosts, make sure the file extension is not text (.txt)
  • Open the new hosts file using Notepad or any other text editor.
  • Since you're using XP, here is what the contents of the hosts file should be:

    enter image description here

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.