Hosts file missing - should I worry?


  1. Posts : 27
    Windows 7 Home Premium Edition (64-bit) Service Pack 1 (Build 7601)
       #1

    Hosts file missing - should I worry?


    Hi
    I've noticed from the W7 32bit Event viewer numerous errors of the type:Event 1012, DNS Client Events. There was an error while attempting to read the local hosts file.
    I have checked the normal location of the Hosts file and it's missing - there are only 4 files there: Imhosts.sam, networks, protocol and services.
    I've Googled and found no solution that works, I've run SFC /SCANNOW and it although it found and repaired some corrupt files it hasn't cured the Hosts file issue.
    My question is: Should I worry since the PC seems to be running OK?
      My Computer


  2. Posts : 5,056
    Windows 7 x64 pro/ Windows 7 x86 Pro/ XP SP3 x86
       #2

    The hosts file doesn't disappear on its own. That file should be unaffected unless you modify it or you have a security program that modifies it to prevent you from going to malicious web sites. So, as a precaution, do a full malware scan with the resident AV as well as MBAM.

    Then you can just recreate the hosts file. Open Notepad as admin (right click on notepad icon or shortcut and click Run as admin) and type the following information in it:

    127.0.0.1 localhost
    ::1 localhost

    The "1" in the "127.0.0.1" must be at the first column of the line and there must be at least one space between "127.0.0.1" and "localhost". In the second line, there must be at least one space between "::1" and "localhost".


    Save the file with the name "hosts" in C:\windows\system32\drivers\etc folder.
      My Computer


  3. Posts : 27
    Windows 7 Home Premium Edition (64-bit) Service Pack 1 (Build 7601)
    Thread Starter
       #3

    Thanks Bill2.
    I've done all you suggested and hosts now remains in it's proper home after reboot.
    What deleted it is a mystery but I'll keep an eye on it for a while.
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 13:28.
Find Us