Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

When i make changes to the hosts file in windows 8, it doesn't work. Although my changes stay in the hosts file.

What I'm trying to, is to redirect the domain name to with this line:

I use avast! and Windows Defender is disabled, so that's not causing the problem. I have tried ipconfig /flushdns in CMD, but it doesn't solve it either.

I have tried searching for the answer on various sites, but with no luck so far. Maybe someone could help me out.

EDIT: Disabling avast! did not not solve the problem.

My hosts file ( doesn't resolve to either):

# localhost name resolution is handled within DNS itself.       localhost
#   ::1             localhost

My %SYSTEMROOT% is C:\Windows

I don't use IIS, but Apache instead.

When I try to ping the domain I get the following:

Ping request could not find host Please check the name and try a
share|improve this question
are you editing the existing host file or did you create a new file and try to overwrite? Editing the file as "Run as Admin.."? – Logman Feb 6 '13 at 15:57
Sounds like the conflict is with Avast. – Ramhound Feb 6 '13 at 16:01
I am just editing the hosts file located at C:\Windows\System32\Drivers\etc\hosts. I didn't find anything on the web about avast! blocking changes to the hosts file. I'll try to disable it and try again. – alysdal Feb 6 '13 at 16:03
Disabling avast did not help. – alysdal Feb 6 '13 at 16:10
What doesn't work? If you ping does it just not resolve? – Cory Smith Feb 6 '13 at 16:21

Are you using Internet Explorer? In my experience you need to restart the IE for hosts changes to be recognised (other browsers will pick up changes straight away).

share|improve this answer
I have tried that with both IE and Chrome, thanks anyway. – alysdal Feb 6 '13 at 16:27

Windows 8 (specifically windows defender) blocks edits to the hosts file.

There's an option in defender to exclude files from this protection.

See this link for specifics:

share|improve this answer
That would just revert any changes, it wouldn't make any program ignore them. – Mario Nov 4 '14 at 8:52

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .