Question: Here's my hosts(with a single entry):

```
127.0.0.1 test

```

But it's not working any more:

```
C:\Documents and Settings\Administrator>ping test
Ping request could not find host test. Please check the name and try again.

```

Why?

**UPDATE**

It stops working ever since I used **[openvpn](http://openvpn.net/)**

**UPDATE2**

![alt text](https://i.stack.imgur.com/ssJRt.png)

Answer: 
I had the same problem none of presented suggestions worked for me. I found the clue there:
<https://serverfault.com/a/50950/161292>

I rigth-clicked on hosts file and went to Properties->Security->Advanced. then I checked *Inherit from Parent* and clicked 'apply'. That solved my problem.
You have a strange problem! But here are some ideas.

a)make sure you're opening the right file  

notepad C:\WINDOWS\system32\drivers\etc\hosts 

b)Check that the file path is right here at this registry key. Check that the path there is The actual HOSTS file location 
HKEY\_LOCAL\_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\DataBasePath 

check that DataBasePath has value %SystemRoot%\System32\drivers\etc

c)you could also try running hijackthis. See if it lists something with key o1, that's host file redirection.. or something to do with it. you could then check the box and choose "fix checked"

You could give it up and do a system restore, which is likely to fix it if you can go back to a good time but it won't tell you what was wrong.. maybe some people will have some other ideas.