You can add the following line in the hosts file:
This will stop displaying all Google ads on all sites, not only those on your own sites.
i did the same thing
but it makes the pages to load very slow.
as each time their is a request for those files from localhost 127.0.0.1
i am looking at some other idea for blocking adsense ads
If you have a web server running on localhost, it won't slow anything down.
|how to stop google adsense from showing at our local computer? |
Have you tried unplugging the computer?
I think that will eliminate the ads 100% of the time.
hey where/what are the hosts file on my computer?
which file to add what code to stop adsense.
I am running XP with IIS6.
If you've used the standard install options
If not, just do a search for "hosts" on your windows drive. It's the file with no extension.
This thread reminds me of a friend who added Adsense to his employer's website, but didn't want the ads to show in the office . . .
Whoa...that takes some nerve.
Obviously the temptation to click your own ads is very high. I recommend Pavlovian therapy methods; I will associate the act of clicking ad links to starving you. Much like the Google method, in that they ban you, then you starve.
Try some mild electric shocks. They're good fun, especially in the right places. Oh, wait... wrong forum.
i serve the ads from an include file, i simply have a line of code in the include that says:
if 127.0.0.1 then display: "ads would be here" else : google ad block
... that is only pseudo code obviously!
still the things don't work
i have several employees working here, who might accidentally click on the ads as they keep working on our website for whole day and few of them are new ones, and i don't want to get into any trouble for clicking ads on our own.
and we are running win xp on all systems and iis is working on only a few systems, but still we face troubles with very slow loading of page due to adsense code looking for some ads on our localhost as well.
Just block the IP range using PHP or the scripting language of your choice.