Windows 7 Forums
Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.

Windows 7: Hosts file missing - should I worry?

12 Dec 2010   #1

Windows 7 Home Premium Edition (64-bit) Service Pack 1 (Build 7601)
Hosts file missing - should I worry?

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 System SpecsSystem Spec
12 Dec 2010   #2

Windows 7 x64 pro/ Windows 7 x86 Pro/ XP SP3 x86

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: localhost
::1 localhost

The "1" in the "" must be at the first column of the line and there must be at least one space between "" 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 System SpecsSystem Spec
12 Dec 2010   #3

Windows 7 Home Premium Edition (64-bit) Service Pack 1 (Build 7601)

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 System SpecsSystem Spec

Closed Thread

 Hosts file missing - should I worry?

Thread Tools

Similar help and support threads
Thread Forum
Windows 7- "hosts" file is missing-what to do?
The "hosts" file in C:\Windows\System32\drivers\etc is missing. The only files are lmhosts.sam, networks, protocol and services. I tried searching for the "hosts" file but couldn't find it in my pc. What should I do here?
System Security
Problem modifying hosts file, change file permissions?
Hi all,win7 Home Premium 64 bit. I'm having difficulties modifying my hosts file. Following guidance from this forum, I open Notepad++ as administrator & can navigate to and open the hosts file. But the "Save" option is greyed out, so I can't save directly to the original location. I can Save As...
General Discussion
Hosts file ignored and replaced with hosts.original
Hello. I am trying to use the hosts file. However both pings and web addresses still bypass the hosts file. I noticed that there is another file in the C:\Windows\System32\drivers\etc directory called 'hosts.original'. When ever I delete this file, it reappears seconds later. I have made sure that...
General Discussion
Why is my hosts file missing?
Hi there, My hosts file on c:\Windows\System32\drivers\etc\ is missing. It doesn't exist anymore. I have tried to put it back in place by using a Microsoft Fix found here How can I reset the Hosts file back to the default? But as soon as the hosts file is back it is deleted again and...
System Security
HOSTS File - Create a "Edit HOSTS file" Shortcut
How to Create a "Edit HOSTS file" Shortcut in Windows 7 and Vista The HOSTS file is a .txt file used in Vista and Windows 7 to map hostnames to IP addresses. Your computer checks this file first to resolve any network names to its corresponding IP address before it tries to check the Internet....

Our Sites

Site Links

About Us

Find 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 15:24.
Twitter Facebook Google+