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
RupertSodwind

Windows 7 Home Premium 32 Bit
 
 
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 System SpecsSystem Spec
.

12 Dec 2010   #2
Bill2

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:

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

Windows 7 Home Premium 32 Bit
 
 

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
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
Hey, I was wondering, is there any internet performance gain if you put a commonly used website's IP (like Google) in your Hosts file, so it doesn't need to ask a DNS server? I mean, because I have 30 websites I go on at least 10 times each day, and it lags when I open all of them :D Thanks!
General Discussion
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....
Tutorials

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 23:58.

Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App