How do I reset my hosts file back to default?

Windows 7 Ultimate 32bit

C:\WINDOWS\system32\drivers\etc

link|improve this question

feedback

2 Answers

up vote 3 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:
#
#      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
link|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? – V413HAV Oct 7 '11 at 8:17
1  
@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 :) :) – V413HAV Oct 7 '11 at 8:21
3  
All lines starting with # are simply ignored, so you might as well leave the file empty. – grawity Oct 7 '11 at 8:25
1  
and set it to read only just for fun. – Psycogeek Oct 7 '11 at 8:26
show 2 more comments
feedback

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):

    %systemroot%\system32\drivers\etc 
    

    (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

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

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