In the hosts file I write:

127.0.0.1 www.facebook.com 127.0.0.1 facebook.com 

I type the address in the Opera and iexplore browsers and see the Facebook page.
What did I do:
1. ipconfig / flushdns
2. disabled the DNS client service and changed the startup type to "manual"
3. disabled all "anti-virus" programs that can edit this file
4. checked the path to the hosts file in the windows registry.
5. Run nbtstat -R
What could be the reason?
Operating system: Windows XP pro sp 3 LanOS

  • Yes, to narrow the problem,> ping facebook.comWhat pings? - pyatak
  • ping facebook.comExchange with facebook.com [69.171.237.16] at 32 bytes: Answer from 69.171.237.16: number of bytes = 32 time = 186ms TTL = 247 .... - PaulD

2 answers 2

Each IP should go with a new line. In your example, the second address is like a domain name.

And also read the remark in the description of hosts on Wikipedia, the item "Use when connecting via a proxy server" https://ru.wikipedia.org/wiki/Hosts

Replacing the IP address with the domain name recorded in the hosts file string does not work (Windows) if you are using a connection through a proxy-server

    Log in as admin windows update. Then delete the hosts file and recreate it, under your user.

    Check the path to the file HKEY_LOCAL_MACHINE \ SYSTEM \ CurrentControlSet \ services \ Tcpip \ Parameters and look at the presence of a hidden file in the folder