Sign up ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

2 Answers 2

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

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.