Take the 2-minute tour ×
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 riddergarn.dev to 127.0.0.1 with this line:

127.0.0.1 riddergarn.dev

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 (example.com doesn't resolve to 127.0.0.1 either):

# localhost name resolution is handled within DNS itself.
127.0.0.1       localhost
#   ::1             localhost
127.0.0.1       riddergarn.dev
127.0.0.1       example.com

My %SYSTEMROOT% is C:\Windows

I don't use IIS, but Apache instead.

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

C:\Users\Andreas>ping riddergarn.dev
Ping request could not find host riddergarn.dev. Please check the name and try a
gain.
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
1  
What doesn't work? If you ping riddergarn.dev 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: http://www.howtogeek.com/122404/how-to-block-websites-in-windows-8s-hosts-file/

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

Your Answer

 
discard

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.