Forum Moderators: martinibuster

Message Too Old, No Replies

How to Block particular countries from viewing my adsense ads

Want to block to avoid unwanted clicks from friends and relatives

         

jhonyjhony

1:52 pm on Mar 12, 2007 (gmt 0)

10+ Year Member



I have a constant fear that some of my known people might keep clicking on my site to get me banned.

One of my friend had this problem, when one of his stupid friend clicked on his ads just to fool around and see what happens.

Other day I was searching some thing in google. When I clicked on one of the search result it showed me that, My IP or my country is not allowed to view this website becasue they dont do business in my country.

I also want to do the same and block the whole of my country viewing my website, becasue as such I hardly have any visitors from my country and I dont mind loosing some money by blocking my own country. I would rather like the peace of mind rather then that constant fear.

By the way I am doing very good in Adsense and I dont want to loose that due to any stupid friend clicking my ads.

Questions
1. Is there any script which I can use to block some country or some IP range
2. Can it done wth HTACESS?

Any other way?

Thanks in advance

Mentat

2:18 pm on Mar 12, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



1. you need an GeoIP Database (maxmind)
2. You need an script that will server different ad codes for different IPs

jhonyjhony

2:48 pm on Mar 12, 2007 (gmt 0)

10+ Year Member



Mentat, Thanks for your Reply. My sites are static html sites. Will the script work on that site.

If you know any such site can you pls private message me.

Hobbs

3:56 pm on Mar 12, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



PHPAdsNew + GeoIPFree + AdSense
Google it for how they can work together with AdSense
You will need your hosting company to install Geo:IPFee perl module for you if it is not already there.
All free except AdSense ;-)

jomaxx

5:20 pm on Mar 12, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You can also do it with .htaccess and that will work with static sites, but you'll have to do some work to identify all the IP ranges involved. Be sure not to block your own.

However this is kind of a stupid solution. There is no reason whatsoever to block entire countries from viewing your site. It would be a shame if people started blocking vast areas of the world from even viewing their websites simply because they're not the target audience, and I'm certain Google would hate to have AdSense be the cause of that.

Hobbs

7:01 pm on Mar 12, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



>stupid solution

Jomaxx,
The O/P is not talking about targeting, but irrelevant clicks, he wants to do advertisers as well as himself a favor and get peace of mind, that's not a stupid solution.

He can block only AdSense ads not the whole site through PHPAdsNew.

jomaxx

7:22 pm on Mar 12, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



He said he wants to block the whole country from viewing his website. IMO that's a stu- er, suboptimal thing to do.

I agree that not showing ads to certain countries is a much better idea. It's not necessary in order to be able to sleep at night, but it's totally different from blocking the whole website.

sailorjwd

9:54 pm on Mar 12, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You can make you site dynamic simply by letting whatever dynamic parser you have see html pages.

In my case I told ASP parser to look at html and now all pages are dynamic... Can't tell any speed difference. I had to do that to show YPN ads with the geo ip db.

chikung

12:26 am on Mar 13, 2007 (gmt 0)

10+ Year Member



I always find it difficult to take action whenever I think about this option. If I block the whole country, I am surely missing good amount of revenue just to avoide the clicking from friends and relatives. Ofcourse getting less revenue is better than getting out of adsense.

But I feel its as good (or bad)as removing the teeth forever so that you will never have toothache.

benevolent001

12:32 am on Mar 13, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



are your pages php? just write simple code to check ip and show or not to show

use free hostip api to check location