Hi! I want to disallow some IP addresses ( of myself and of some known bots clicking rapidly on adsense ads). How can I do this ? And if i have a wordpress blog how can i do this?
The basic concept of how to do it can be found here: http://www.webmasterworld.com/google_adsense/3297551.htm You may have to adjust to your particular setup. Hope this helps...
Here is what you would add to your .htaccess to deny IP's: RewriteEngine On order allow,deny deny from 216.9.35.60 deny from 174.133.146.18 deny from 74.125.19.147 allow from all
Note, though, that this blocks them so they can't see ANY of your site whereas the other method above lets them see your site but NOT the ads.
yep, this is a quick and easy fix that can be be implemented to every single site with a single edit, useful if you have dozens of domains, which means you don't need to mess with source code. I prefer this because I don't that bot/visitor on my website, period.
it's a great tips.. i thought the only way to do it was to set it up on htaccess file.. thanks, mate..
Using this will block the whole site from getting displayed in the IP. And Actually I wanted to block my own IP address as my ISP provides same outgoing IP to every users and I got some clicks from my own Ip also as seen from my visitor tracking software!
<?php $visitorIP = $_SERVER['REMOTE_ADDR']; $blockedips = array('123.45.', '123.56.', '123.67.67.'); if (!in_array($visitorIP,$blockedips)) { ?> // adsense code here <?php } ?> HTML: use this method as earlier mention
Do you also know of a script that will stop adsense ads from showing if they've been click on say 3-4 times?