Twitist Forums
Can you block Facebook Ads With Host File? - Printable Version

+- Twitist Forums (http://twitist.com)
+-- Forum: Facebook forums (/forum-14.html)
+--- Forum: Facebook ads (/forum-19.html)
+--- Thread: Can you block Facebook Ads With Host File? (/thread-119513.html)



Can you block Facebook Ads With Host File? - hartk10 - 03-24-2014 04:24 PM

I've been trying to block Facebook ads via my Host file but with no success. Here is the code I'm using
# [Facebook]
127.0.0.1 ads.ak.facebook.com
127.0.0.1 creative.ak.facebook.com
127.0.0.1 creative.ak.fbcdn.net #[textads]
but it doesn't seem to be doing the trick for me. I have cleared my cache but all to no avail.

While Googling for information I read that you can't block Facebook ads. Is this true?

Many thanks for your advice

Kevin


- Toothpaste - 03-24-2014 04:25 PM

Yes that looks ok, assuming the URLs are the only ones Facebook uses to place ads. None of those URLs seem to bring up a web page by themselves (just a blank page), so to test it's working you could try blocking something like myspace.com, then see if you can visit it.

Sometimes you need to restart the computer as the browser can temporarily cache the IP addresses of URLs it's just resolved, or alternatively you could try typing ipconfig /flushdns into the command prompt.

Personally I just use Adblock Plus http://adblockplus.org it allows you to whitelist sites, so if you didn't want to block ads on a certain website you could add it as an exception.