Thursday, 24 November 2011

If hosts file does not seem to work in your browser

Given a host file with the following content:

10.100.12.10 yourhost.co.uk

If your hosts file does not seem to work with yourhost.co.uk when you load that url in firefox, internet explorer, chrome and/ or safari and you get a message like this:

Network Error (dns_unresolved_hostname) 

 
Your requested host "yourhost.co.uk" could not be resolved by DNS.  
 

For assistance, contact your network support team.  

but ping can resolve the ip address,

Pinging yourhost.co.uk [10.100.12.10] with 32 bytes of data:
Reply from 10.100.12.10: bytes=32 time<1ms TTL=64
Reply from 10.100.12.10: bytes=32 time<1ms TTL=64
Reply from 10.100.12.10: bytes=32 time<1ms TTL=64
Reply from 10.100.12.10: bytes=32 time<1ms TTL=64

Ping statistics for 10.100.12.10:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 0ms, Maximum = 0ms, Average = 0ms

Try to go to your internet explorer, then "internet options", then click "connections" tab, then click "LAN settings" button. Although you are accessing this internet options through explorer, it affects the other browser as well. Please untick "Automatically detect settings", at least the fixed my problem, it may fix yours.

3 comments:

  1. Thank you! :)
    Let me comment my issue with browser like that.
    I've setup a Windows 7 VM on Virtual Box. My localhost was 172.31.13.104 with a web-server on 8080 port. VM's network in 'Bridged' mode.
    When I tried to get an access to webserver 172.31.13.104:8080/webserver/ via Chrome it was successful. But IE failed. All browsers can connect but not IE... :)
    The solution is... amazing :D
    Just added 'http://' prefix :-/
    P.S. It's a minor issue but it cost me 30 minutes of work time. Help this comment will help someone :)
    Regards, Igor

    ReplyDelete
  2. Thanks a lot for sharing this with all folks you really recognise what you are talking about! In this complex environment business need to present there company data in meaningful way.Sqiar (http://www.sqiar.com/consultancy/tableau/) which is in UK,provide services like Tableau and Data Warehousing etc .In these services sqiar experts convert company data into meaningful way.

    ReplyDelete
  3. You also may want to disable the proxy (http://superuser.com/questions/252452/browsers-ignoring-hosts-file)

    ReplyDelete