User Name
Password
AppleNova Forums » Genius Bar »

Using Hosts File to Block Ads


Register Members List Calendar Search FAQ Posting Guidelines
Using Hosts File to Block Ads
Thread Tools
atomicbartbeans
reticulating your mom
 
Join Date: Jan 2005
Send a message via AIM to atomicbartbeans  
2005-12-18, 19:25

I was reading Brad's article (interweb link) about blocking ads using OS X's hosts file. Seems very cool, but is there a list of well-known ad servers to add to our hosts file? Seems kinda tedious to go through all that every time I come across a new ad... or even better... Brad, mind sharing your own hosts file with us?

You ask me for a hamburger.
  quote
Brad
Selfish Heathen
 
Join Date: May 2004
Location: Zone of Pain
 
2005-12-18, 19:29

I already did once before. Didn't I post it in one of the previous threads?
  quote
chucker
 
Join Date: May 2004
Location: near Bremen, Germany
Send a message via ICQ to chucker Send a message via AIM to chucker Send a message via MSN to chucker Send a message via Yahoo to chucker Send a message via Skype™ to chucker 
2005-12-18, 19:30

Didn't he already post it somewhere?

(edit) Damn you, Brad.
  quote
Brad
Selfish Heathen
 
Join Date: May 2004
Location: Zone of Pain
 
2005-12-18, 19:30

In fact, I did and it was downloaded 107 times (as of this posting).

Search before posting!

Yes, it took me less than a minute to search and find it. I imagine it couldn't take much longer for mere mortals.

The quality of this board depends on the quality of the posts. The only way to guarantee thoughtful, informative discussion is to write thoughtful, informative posts. AppleNova is not a real-time chat forum. You have time to compose messages and edit them before and after posting.
  quote
atomicbartbeans
reticulating your mom
 
Join Date: Jan 2005
Send a message via AIM to atomicbartbeans  
2005-12-18, 19:51

Ouch, sorry Brad.

(please delete me)
  quote
Brad
Selfish Heathen
 
Join Date: May 2004
Location: Zone of Pain
 
2005-12-18, 20:02

Nah, that's okay. Just a friendly jab. For future reference, here's that download link:

Brad's hosts file for blocking ads

Additional discussion for configuring the Apache httpd.conf file for hiding 404 messages can be found here.

The quality of this board depends on the quality of the posts. The only way to guarantee thoughtful, informative discussion is to write thoughtful, informative posts. AppleNova is not a real-time chat forum. You have time to compose messages and edit them before and after posting.
  quote
chucker
 
Join Date: May 2004
Location: near Bremen, Germany
Send a message via ICQ to chucker Send a message via AIM to chucker Send a message via MSN to chucker Send a message via Yahoo to chucker Send a message via Skype™ to chucker 
2005-12-18, 20:03

I prefer privoxy, though I haven't found a really nice config file for it.
  quote
atomicbartbeans
reticulating your mom
 
Join Date: Jan 2005
Send a message via AIM to atomicbartbeans  
2005-12-18, 20:25

Thanks Brad!

I gave it a test run by going to the site everybody loves to deride because of the ads (many of you came from it originally), and hey, no ads!



Edit: By the way, it would be super-helpful to others if you put that link on your web site.

You ask me for a hamburger.

Last edited by atomicbartbeans : 2005-12-19 at 15:34.
  quote
atomicbartbeans
reticulating your mom
 
Join Date: Jan 2005
Send a message via AIM to atomicbartbeans  
2006-02-23, 11:36

Okay, something is a bit weird here. Brad, while using your hosts file, some web sites (appleinsider.com is a funny example) redirect to my iBook's web server (echobase.dyndns.org). Changing Apache's configuration to hide the 404's doesn't fix this problem.

You ask me for a hamburger.
  quote
Brad
Selfish Heathen
 
Join Date: May 2004
Location: Zone of Pain
 
2006-02-23, 11:40

Quote:
Originally Posted by atomicbartbeans
Okay, something is a bit weird here. Brad, while using your hosts file, some web sites (appleinsider.com is a funny example) redirect to my iBook's web server (echobase.dyndns.org).
Yeah, that's expected. I didn't mention it in the article but I'm sure I did in one of the threads here where I've explained it.
Quote:
Originally Posted by atomicbartbeans
Changing Apache's configuration to hide the 404's doesn't fix this problem.
That's weird. Are you sure it's configured properly? What changes exactly did you make to httpd.conf?

The quality of this board depends on the quality of the posts. The only way to guarantee thoughtful, informative discussion is to write thoughtful, informative posts. AppleNova is not a real-time chat forum. You have time to compose messages and edit them before and after posting.
  quote
atomicbartbeans
reticulating your mom
 
Join Date: Jan 2005
Send a message via AIM to atomicbartbeans  
2006-02-23, 11:47

I replaced the

#ErrorDocument 404 /missing.html

with

ErrorDocument 404 "
  quote
Brad
Selfish Heathen
 
Join Date: May 2004
Location: Zone of Pain
 
2006-02-23, 11:52

Hrmm. And how exactly does it behave? Screenshot?

It should point to your local web server, but display a blank frame or broken image anywhere it hits one of the "blocked" addresses.

The quality of this board depends on the quality of the posts. The only way to guarantee thoughtful, informative discussion is to write thoughtful, informative posts. AppleNova is not a real-time chat forum. You have time to compose messages and edit them before and after posting.
  quote
atomicbartbeans
reticulating your mom
 
Join Date: Jan 2005
Send a message via AIM to atomicbartbeans  
2006-02-23, 11:57

Well that's the thing... when I see a blocked ad on another site, it's a blank frame, as one would expect... but some web sites I type into the address bar simply redirect to my web server's home page. Is this a side-effect of the modified hosts file, or something wrong with Apache?

You ask me for a hamburger.
  quote
Brad
Selfish Heathen
 
Join Date: May 2004
Location: Zone of Pain
 
2006-02-23, 11:58

If it's a blocked site, that's normal. It's redirecting you just as if it was embedded content from the site. Everything that has to do with the site gets redirected.

The quality of this board depends on the quality of the posts. The only way to guarantee thoughtful, informative discussion is to write thoughtful, informative posts. AppleNova is not a real-time chat forum. You have time to compose messages and edit them before and after posting.
  quote
atomicbartbeans
reticulating your mom
 
Join Date: Jan 2005
Send a message via AIM to atomicbartbeans  
2006-02-23, 12:01

Alright, schweet. So, if I wanted to access a site that was blocked, I could simply remove the proper line from the hosts file?
  quote
Brad
Selfish Heathen
 
Join Date: May 2004
Location: Zone of Pain
 
2006-02-23, 12:06

Yup! And run "lookupd -flushcache".
  quote
Posting Rules Navigation
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Post Reply

Forum Jump
Thread Tools
Similar Threads
Thread Thread Starter Forum Replies Last Post
Modifying hosts file...please help. SledgeHammer Genius Bar 21 2008-05-07 23:28
File permissions for Apache web server jeff560 Genius Bar 0 2005-11-14 19:25
Apple Stores instead of Apple Ads intlplby General Discussion 2 2005-11-04 02:00
New File Browser? Electric Monk Speculation and Rumors 3 2005-06-16 21:53
Modified Hosts File? SledgeHammer General Discussion 1 2005-02-02 20:34


« Previous Thread | Next Thread »

All times are GMT -5. The time now is 12:22.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004 - 2024, AppleNova