Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I tried to block some hosts to load from them ads and scripts. for example in /etc/hosts:

Why after editing and saving the file, firefox (after restart) still load this sites (not from cache of course)?

My /etc/host.conf seems to search previously in hosts file

order hosts,bind
multi on

What's wrong?

share|improve this question

migrated from Nov 20 '10 at 17:14

This question came from our site for professional and enthusiast programmers.

host.conf is obsolete, look in nsswitch.conf .

share|improve this answer
Do you know how to use it instead of /etc/hosts? Because the manual doesn't seem to give even a little hint, and I couldn't find an examples about that. /etc/hosts can't supposed to be obsolete until the new one can execute it's functions. From manual I am doubt that it is. – Hi-Angel Sep 30 '14 at 13:56
/etc/host.conf is obsolete, /etc/hosts isn't. nsswitch.conf decides whether and how /etc/hosts is used. – Tobu Oct 1 '14 at 13:28

Does your Firefox use proxy? /etc/hosts SHOULD effect your Firefox (I tested it). What is the result of pinging those addresses?

share|improve this answer
How did you test this? In my experience, a proxy overrides /etc/hosts. – SabreWolfy Feb 28 '13 at 11:16
If you turn on the feature that intranet addresses should not use proxy, then /etc/hosts should no be overridden by the proxy (technically it is not an override, the domain you try to reach will be sent to the proxy, and the proxy will re-resolve it by its own DNS which will return a correct IP). – karatedog Feb 28 '13 at 15:13

You must log in to answer this question.