SiteLibrary

Internet Information Portal

 



Pages: [1]    Printer Friendly Version
Very Hot Thread Author:
Topic: Block Google Ads?

Jos
(jos)
Female
Administrator
Developer
*******

Member Since: 08/09/03
Forum Posts: 2638
United States
General Thread  Block Google Ads?
 Posted on 08/25/05 at 06:46:13 GMT

I saw a comment on the Google Ads Poll about blocking Google Ads using etc/hosts file. The comment was by Andy. Although I would probably never want to block them because they amuse me, I am curious. I wonder, how is this done?


-----------------
~
IP address Logged
Visit the homepage of Jos   Link to This Post  

Andy Alkaline
(GravityIsForSucker)
Male
Level 4
Cruiser
****

Member Since: 08/20/05
Forum Posts: 169
United States
General Thread  Re: Block Google Ads?
 Posted on 08/25/05 at 22:32:36 GMT



Jos wrote:
I saw a comment on the Google Ads Poll about blocking Google Ads using etc/hosts file. The comment was by Andy. Although I would probably never want to block them because they amuse me, I am curious. I wonder, how is this done?



If you're using Windows then the hosts file is in a different dir, but if you open up your existing hosts file, you'll see a line

code:

127.0.0.1     localhost


What the hosts file does is resolve domain names. 127.0.0.1 is your local ip. so this is some of what my hosts file looks like.


code:

127.0.0.1  servedby.advertising.com
127.0.0.1  ad.doubleclick.net
127.0.0.1  ar.atwola.com
127.0.0.1  pagead2.googlesyndication.com
127.0.0.1  atdmt.com
127.0.0.1  doubleclick.net
127.0.0.1  m.doubleclick.net
127.0.0.1  spe.atdmt.com
127.0.0.1  atdmt.com
127.0.0.1  mediaplex.com
127.0.0.1  www.fededloan.com
127.0.0.1  www.fededloans.com



Which works fine unless I'm running the apache webserver on my computer.

Normally the ip of a domain is looked up at your ISP's dns server. You can also put in *actual* ip's which could shave a few nano seconds off the time it takes for a site to load. No dns resolution via the remote DNS server. Since it's usually a DNS server on your own network, the lookups are pretty fast anyway.


-----------------
Blasphology 1007 - "Money can indeed buy happiness, but it will be heavily taxed."
IP address Logged
Link to This Post  

Andy Alkaline
(GravityIsForSucker)
Male
Level 4
Cruiser
****

Member Since: 08/20/05
Forum Posts: 169
United States
General Thread  Re: Block Google Ads?
 Posted on 08/26/05 at 04:34:02 GMT


Jos wrote:
I saw a comment on the Google Ads Poll about blocking Google Ads using etc/hosts file. The comment was by Andy. Although I would probably never want to block them because they amuse me, I am curious. I wonder, how is this done?



At least you aren't worried about costing them profits. Refer to the top ten most commented articles here - "Microsoft Acquiring Google" if you are interested, I did some stock comparisons, kind of interesting and surprising as well.

Comment 39 I believe.


-----------------
Blasphology 1007 - "Money can indeed buy happiness, but it will be heavily taxed."
IP address Logged
Link to This Post  

Jos
(jos)
Female
Administrator
Developer
*******

Member Since: 08/09/03
Forum Posts: 2638
United States
General Thread  Re: Block Google Ads?
 Posted on 08/26/05 at 05:05:38 GMT

That's a neat trick I didn't know about. Thanks Andy Alkaline.

I rename my hosts file to hosts.sam when I'm online so my server won't hook up my domains to my own computer. Then I rename it to hosts again when I'm using my server. I use a bat file to rename it, that I found on the internet. I suppose it could be rewritten to do a 3 way rename to provide for these extra filtering tricks.

Thanks for the info.


-----------------
~
IP address Logged
Visit the homepage of Jos   Link to This Post  

Andy Alkaline
(GravityIsForSucker)
Male
Level 4
Cruiser
****

Member Since: 08/20/05
Forum Posts: 169
United States
General Thread  Re: Block Google Ads?
 Posted on 08/26/05 at 05:35:53 GMT


Jos wrote:
That's a neat trick I didn't know about. Thanks Andy Alkaline.

I rename my hosts file to hosts.sam when I'm online so my server won't hook up my domains to my own computer. Then I rename it to hosts again when I'm using my server. I use a bat file to rename it, that I found on the internet. I suppose it could be rewritten to do a 3 way rename to provide for these extra filtering tricks.

Thanks for the info.



I don't quite follow you. Your server shouldn't be reading your hosts file. Maybe I'm tired. Nah, that couldn't be. Sure it could.

One instance of where your server might resolve dns names from you is if you're running a dns caching server. That's only as far as I know though. But even with a dns server you should be able to configure it so that won't happen.

You're most welcome by the way. I think I learned about that trick from spybot search and destroy.
http://www.safer-networking.org/

One of its features is that it will prefill in a ton of known ad/spy/mal-ware domain names and write to your hosts file, putting a 127.0.0.1 in front of all those known domains.

It also has a feature that will lock your hosts file. If one does get some nasty little malware, the ware will write your hosts file, thus redirecting you. You could go to http://www.google.com/ but it will resolve to an IP of some entirely different site.


-----------------
Blasphology 1007 - "Money can indeed buy happiness, but it will be heavily taxed."
IP address Logged
Link to This Post  

Jos
(jos)
Female
Administrator
Developer
*******

Member Since: 08/09/03
Forum Posts: 2638
United States
General Thread  Re: Block Google Ads?
 Posted on 08/26/05 at 17:13:17 GMT

Wow that is no good malware to do things like that to my hosts file.

The reason my hosts file is different is that I set it up to resolve my domain names so I can run my sites the same way as they are on the internet, like www.sitelibrary.net .


-----------------
~
IP address Logged
Visit the homepage of Jos   Link to This Post  

Andy Alkaline
(GravityIsForSucker)
Male
Level 4
Cruiser
****

Member Since: 08/20/05
Forum Posts: 169
United States
General Thread  Re: Block Google Ads?
 Posted on 08/26/05 at 22:48:47 GMT

Okay, I think I know what you mean now.


-----------------
Blasphology 1007 - "Money can indeed buy happiness, but it will be heavily taxed."
IP address Logged
Link to This Post  

Jos
(jos)
Female
Administrator
Developer
*******

Member Since: 08/09/03
Forum Posts: 2638
United States
General Thread  Re: Block Google Ads?
 Posted on 08/27/05 at 05:29:53 GMT

Mine just says:

code:

#127.0.0.1       localhost
127.0.0.1       www.bantychicken.com
127.0.0.2       www.sitelibrary.net
127.0.0.2       www.open-id.com
127.0.0.2       www.bantychick.com
127.0.0.2       www.wideopensources.com




-----------------
~
IP address Logged
Visit the homepage of Jos   Link to This Post  
  Block Google Ads?
  Meeting Place
   Forums
Pages: [1]
 
Hop to:

Who's On


EST Nov. 2002 ~ Copyright © 2002-2009 ~ SiteLibrary


Member's Banner Ad
Member's Banner Ad - Got a Banner? Enter it Here!
View All Banners



This site was made with WebAPP Web Automated Perl Portal system v0.9.9.9 RC4 , a web portal system written in Perl.
All trademarks and copyrights on this page are owned by their respective owners.
Comments are owned by the Poster.

XML v1.0