Windows – IE ignores hosts file; works in Firefox

hosts-fileinternet explorerwindowswindows 7

I've edited my hosts file in a Windows 7 VM, but it doesn't work in IE. It works with Firefox, though. I hope this itemized list will help more than a verbose description.

Environment

  • Windows 7 in a VirtualBox VM, Linux (ArchLinux) host
  • VM has a bridged network adapter
  • The hosts file has a series of entries to the same IP for different hosts names:

    192.168.1.100    one.local
    192.168.1.100    two.local
    
  • The Internet options has no proxy configured and no automatic configuration.

What I've done

  • Restarted IE
  • Restarted Windows
  • Ran ipconfig /flushdns
  • ping one.local returns 192.168.1.100

Results

  • Firefox works; requests to one.local return the webpage from my Windows VM's host.
  • IE returns Bing search results for one.local.

Best Answer

What happens if you change the domain to one.local.com?

local. is not an available TLD, so IE might be auto-redirecting anything that can't be a valid URL on the internet to whatever search provider you have configured.

Related Question