Block ads by redirecting their domains to localhost

Posted on Monday 4 April 2005

This is a pretty neat hack. Block ads regardless which browser you’re using by redirecting their domains to your local computer.

Mike’s Ad Blocking Hosts File

Since my mac has a local web server running, I got error messages instead of ads. So I also added a line to my mac’s local apache config file so that I wouldn’t get a 404 error message all the time. I just edited /etc/http/http.conf and inserted the following line towards the end:
ErrorDocument 404 "Blocked

You can get a hosts file that includes a huge list of ad servers and learn more about how to do it at the link above . You might even be able to make use of the list for Firefox’s AdBlock plugin..


Related Posts

No comments have been added to this post yet.

Leave a comment

(required)

(required)


Information for comment users
Line and paragraph breaks are implemented automatically. Your e-mail address is never displayed.

Use the buttons below to customise your comment. HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>


RSS feed for comments on this post | TrackBack URI