How To Prevent Spy Bots From Snooping Around Your PPC Campaigns
- 16 Comment
As PPC affiliates, we spend countless hours researching our market, collecting keywords, building landing pages, and writing ads. After endless splits tests and tweaks, we finally find that grand slam “campaign” that seemingly deposits money into our bank, hand over fist. Month after month, the campaign is running strong, until one day for no apparent reason, the money dries up. What happened?
A number of things “could’ve” happened, but there is no time for speculation. There are “intelligence gathering” spiders out there, crawling and collecting all of our hard work into a centralized repository, for other affiliates to simply shortcut their way to your hard earned riches. Can anything be done to stop them?
Stopping these spy bots 100% of the time may or may not be possible, so prevention at the basic level is our best defense. We can construct a basic line of defense using our server’s .htaccess file.
If you aren’t familiar with .htaccess, you need to get educated quickly. Having a look at this article will get you up to speed with the rest of this tutorial: Apache Tutorial: .htaccess files
When I talk about “spy bots”, two that are widely in use among PPC affiliates comes to mind: KeywordSpy & SpyFu. Without giving you the whole breakdown of what these two services do, the reader’s digest version is: They steal your shit!
Luckily though, with a few .htaccess mods, we can block their spiders from ever visiting your site, therefore prevent the further analysis of your campaigns.
Here’s what you need to do:
1) Make a backup of your current .htaccess file. Modding existing .htaccess files can be tricky, especially if they already contain data. Save your ass and your site with a backup. Trust me.2) Open the existing .htaccess or create a new one with notepad.
3) Add the following text on a new line:
<Limit GET HEAD POST>
order allow,deny
deny from 74.53.36.242
deny from 65.39.72.142
deny from 66.34.204.26
deny from 66.34.0.
deny from 66.34.255.
deny from keywordspy.com
deny from keywordspypro.com
deny from spyfu.com
deny from spyfoo.com
deny from foospy.com
deny from fuspy.com
allow from all
</LIMIT>
What these lines do is blacklist the specified IPs and domains from being served a website upon request to your server. Notice that not all of the “deny” lines include full IP addresses, but just the first 3 octets of the address. This specification prevents the entire range of IP addresses on the given network from accessing your site in case other servers not listed might actually be the culprit data mining servers.
4) We’re not done yet. Again, on a new line add the following:
RewriteCond %{HTTP_REFERER} keywordspy\.com [NC,OR]
RewriteCond %{HTTP_REFERER} keywordspypro\.com
RewriteCond %{HTTP_REFERER} spyfu\.com [NC,OR]
RewriteCond %{HTTP_REFERER} foospy\.com [NC,OR]
RewriteCond %{HTTP_REFERER} fuspy\.com [NC,OR]
RewriteCond %{HTTP_REFERER} spyfoo\.com [NC,OR]
RewriteRule .* - [F]
What we’re doing with these lines is returning a 403 Forbidden Error to the server when the referrer is equal to the domains specified. In this case, I am “forbidding” KeywordSpy.com and SpyFu.com, along with a few other domains owned by these companies from collecting data.
Note: In order to make use of rewrites, the Apache modrewrite module must be enabled on your server. In most cases this is enabled by default, but with some web hosts, it won’t be. Add “RewriteEngine On” to the top of your .htaccess (w/o quotes)
5) Save your file as .htaccess and upload to the root directory of your server. If Windows gives you problems with naming your file .htaccess, simply call it “htaccess.txt”, upload it with FTP, then rename it once it’s on the server.
Note: Depending upon your server security, youre .htaccess file could be viewable by others. To prevent this, add the following lines and also CHMOD your .htaccess to 644 permissions:
<Files .htaccess>
order allow,deny
deny from all
</Files>
If you want to see a complete working example of a .htaccess file you can use, download here (rename to .htaccess) :
Now what we’ve just done is add two lines of defense. Not only are we blocking the named IP addresses and ranges from accessing our servers, we are also denying them based on domain name. The IP addresses may change at some point in time, but most likely the domain names will stay the same. For example, by adding “deny from keywordspy.com”, we are blocking Keyword Spy from visiting our site, no matter which IP address keywordspy.com may be assigned. So blocking both domain names and IPs will provide extra protection from future changes.
Of course the above mods aren’t an end all solution. The IP addresses in the deny section may change over time, so it will be your job as a defensive marketer to continually monitor which online spy bots are out there, get a list of their IP addresses and possibly ranges, and update your .htaccess file accordingly.
Also, check your server logs regularly for suspicious queries and new spiders that may be accessing your site. If your landing pages, keywords, and ads are already included in the databases of SpyFu or KeywordSpy, then I’m afraid you’ll just have to wait for the data to be removed, if at all.
I’m not 100% sure, but once the bots are denied access, I believe that over time these services will consider your campaign “offline”, and purge the collection of data from your site. But then again, KeywordSpy has a “TimeMachine” feature that can go back in time and pull cached data.
Again, the above mentioned mod won’t be a fix all to your spy bot problems, but just one protective measure you can take to better defend yourself from “clone” affiliates copying your campaigns. But if you’re on the Internet, you’re vulnerable. Period.
Luckily though, the data collected by these bots is often either outdated or simply wrong. They can monitor how long your keywords have been running, but not necessarily detect which specific keywords are profitable for you.
Also, because of numerous factors such as CPCs, commission rates, upsells, etc, they really have no idea how accurate your ROI is per keyword. So if you use these tools yourself to collect information, take it with a grain of salt and test before you get excited thinking you’ve just found yourself a profitable campaign.
There are so many factors at play influencing whether or not a campaign is profitable, even having a list of of keywords you know for a fact that someone is making money with, isn’t necessarily the magic bullet toward the riches. Testing will out win “copying” any day.
If you have other methods or insite into how spy bots collect data, be sure to let me know so I can update this post (and of course give credit where credit is due).
Way of the Warrior - Tip of the Day: Learn how to use and master .htaccess. It can be your friend when in need. But remember to make a backup before making any changes. Mistakes in your .htaccess can be disasterous to your website.
Similar Posts Of Interest:
16 Comments on this post
Trackbacks
-
Clint Lenard said:
I gotta say… most people have junky, overused tutorials on their blogs. This was awesome. I’ll definitely be trying this soon.
Thanks for the great info!
September 6th, 2008 at 5:44 pm -
Malan said:
So if I wanted to block http://www.sitename.com I would add:
RewriteCond %{HTTP_REFERER} sitename\.com [NC,OR]
??
September 15th, 2008 at 9:59 pm -
Wes (MasterlessSamurai.com) said:
You got it! You can use .htaccess like your own little firewall.
Now though, if a site like Keyword Spy is visiting you but first erasing their referrer, then we might have a problem. But its better than no defense at all.
September 15th, 2008 at 10:11 pm -
Wes (MasterlessSamurai.com) said:
@Clint Lenard: thanks for the comment. I’ve been seeing a void in affiliate blogs lately so I’m hoping to put some more advanced stuff that might be useful, especially tutorials.
September 15th, 2008 at 10:23 pm -
Alan said:
Wes —
Thanks, this was JUST what I needed as we’ve got a decent PPC campaign in a new niche ready to expand from the test stage.
I appreciate the good ACTIONABLE advice on your blog — please keep it up!
October 12th, 2008 at 8:08 am -
welshnoonoo said:
Thanks for this! I searched specifically for a way to block this bot and you were the only site that actually came up with anything at all practical and useful!
I take it though that as and when they change their IP address, we will have to change the .htaccess file?
October 22nd, 2008 at 1:42 am -
Wes (MasterlessSamurai.com) said:
@welshnoonoo: Glad you found it useful. You are right in that if they change their IPs, or add other datacenters from which they spider sites, the .htaccess will need to be updated.
I’ve updated the post though with more information on blocking Keyword Spy and Spy Fu via domain name as well as IP, and preventing others from viewing your .htaccess file. See the sample .htaccess file for format.
October 22nd, 2008 at 1:50 am -
Alan said:
Wes,
Just to be sure I’ve got this right:
If I wanted to block spy bots from other competing services (such as iSpionage, PPC Bully/MyAdWise, Hexatrack, Affiliate Elite) as they crop up, is the process to add to the htaccess file:
1) deny (their URL)
2) deny (their IP)
3) RewriteCond %{HTTP_REFERER} (their URL) [NC,OR]Look right?
Best and thanks again for an awesome post,
AlanOctober 23rd, 2008 at 10:00 am -
Wes (MasterlessSamurai.com) said:
If you can track down the IP blocks each of the services use, then yes…just continue to add them into your .htaccess file.
If you email me any updates you find, I’ll surely update this post with the new info.
I know this mod works though, as the spy tools once had one of my campaigns, and now its nowhere to be found. Chaching!
October 23rd, 2008 at 10:55 am -
Vin said:
awesome! i’ve been looking for this for a while. thanks!
October 28th, 2008 at 8:20 pm -
Alan said:
Hi Wes,
Thanks for your reply!
I added the following to my file to try to block 3 of the other spy tools:
deny from 65.39.221.16
deny from 66.39.157.106
deny from 208.73.48.154
deny from ppcbully.com
deny from affiliateelite.com
deny from ispionage.com
RewriteCond %{HTTP_REFERER} ppcbully\.com [NC,OR]
RewriteCond %{HTTP_REFERER} affiliateelite\.com [NC,OR]
RewriteCond %{HTTP_REFERER} ispionage.com\.com [NC,OR]October 31st, 2008 at 2:18 pm -
Wes (MasterlessSamurai.com) said:
That’s the idea, though I’m not too sure about Affiliate Elite. Since Affiliate Elite is a desktop tool, it runs from whatever the IP of the user who is using it. The actual affiliateelite.com website is simply the site that sells the software.
Keep sending me any new IPs/Domains you find though. I wanna keep this .htaccess file updated against all the spy tools we can find.
November 3rd, 2008 at 6:43 pm -
Marc said:
The keywords that I am using for my campaigns come from Google AdWords. In your example you are only blocking the keyword Spytools the access to my advertising site. But couldn’t they still see my keywords by accessing the Google API?
November 16th, 2008 at 3:50 am -
Wes (MasterlessSamurai.com) said:
If the tools have access to some sort of API backend, then yes perhaps they could still get some of your data. But I know alot of them rely on spidering your site, as this can be seen in the weblogs. The best thing in addition to blocking with .htaccess that I can suggest is that you run your campains with multiple domains so no seeable patterns can be found in your marketing.
November 16th, 2008 at 5:02 am -
Hock said:
Wes,
Great tip. People should be concerned about protecting their cash cows.
November 20th, 2008 at 10:46 am -
affiliate marketing project said:
wes,
here’s two more spybots to add to your list:
www ispionage com
www adtextgenerator comcan anybody create a script that we can put in our landing pages so we can trap spybots when they visit? or are the logs good enough?
thanks for this very valuable info.
manuel
November 21st, 2008 at 3:49 pm







