Forum Moderators: martinibuster
However, IMO this is not necessary. Once you get to the point where you're cutting back your AdSense income to protect yourself from phantom risks, you've been reading too many paranoid ramblings. The only thing I would recommend is disabling AdSense access to any other PC's you have in your home. This is easily done, and with 2 non-work PC's in my house, it's one less thing for me to worry about.
You can do this via the Windows hosts file; the location varies, but on my PC it's in \windows\system32\drivers\etc. To prevent the PC from showing AdSense ads, add this line to the bottom.
127.0.0.1 pagead2.googlesyndication.com
# Copyright (c) 1993-1999 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
#
# For example:
#
# 102.54.94.97 rhino.acme.com # source server
# 38.25.63.10 x.acme.com # x client host
127.0.0.1 localhost
127.0.0.1 pagead2.googlesyndication.com
Jomaxx - IF all I do is add to the host file, which is a subfile of the etc file the line that appears bolded above this will "do the trick"?
What if the other PCs in the house are connected via a wireless router? Same setting, same outcome?
Thanks. I owe you a cold frosty one. ;0)
The above modification will also cease displaying G ads on other publisher's site too.
Yes, putting that in your host file will prevent you to view other sites Google ads as well.
Can I use a PHP or ASP script to choose to include Adsense script or not in my pages depand on visitors IP? Will that against TOS?
<%
If Not Request.ServerVariables("Remote_Addr")="192.168.2.18" Then
%>
<script type="text/javascript"><!--
google_ad_client = "pub-9999999999999999";
google_ad_width = 160;
google_ad_height = 600;
google_ad_format = "160x600_as";
google_ad_channel ="";
google_color_border = "FFFFCC";
google_color_bg = "FFFFCC";
google_color_link = "990000";
google_color_url = "009999";
google_color_text = "000000";
//--></script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
<%
End If
%>