Update: I’ve switched away from using WordPress plugins for redirects, as a non-WordPress solution turns out to be much faster. More details here: how to cloak your affiliate links. The bit about Analytics below is still relevant though.
Google will always say they won’t penalize you for affiliate links per se, but for thin content around it. I can make this into a long story, but let’s make it short: there’s very good reasons for me and several other highly respected SEO’s and affiliates around the world to think otherwise. Let me show you how to hide them.
In yesterday’s WordPress Podcast, Nathan Rice of StudioPress pointed us at a new plugin they’ve developed called Simple URLs. It works great, and I thought I’d use it to show you how to properly hide your affiliate links from Google. First of all, install that plugin. It will create a new custom post type and after that, you can very simply add a new redirect:
Hit publish, and your redirect will work. The plugin will keep track of how many people followed the URL too, and show you in the overview:
Now, you’ve hidden your affiliate link. However, Simple URLs will do a straight 301 redirect, this is good for lots of cases, but in this case that would mean Google would still end up at the final destination, and we don’t want that. So what you do is very simple: you go into your site’s robots.txt file, and you add one line:
If you didn’t have a robots.txt file yet, you’d need to have at least one line above that:User-Agent: *
This means that the lines below are valid for all search engines.
This will prevent search engines from following those links, and thus prevents you from being penalized for those affiliate links. Of course, if you’re a bit more hard core, the best way would be to go one step further. Then you’d do a conditional redirect on those links: if it was a search engine spider, you’d redirect them back to your homepage or another post, if it was a normal user, you’d redirect them to the affiliate link. That’s a bit shady though, so I wouldn’t recommend doing that if you’re not 100% sure you know what you’re doing.
Affiliate Link Analytics
Now if you start doing this, it’s also useful to add the outbound click tracking in my Google Analytics plugin. If you’ve enabled outbound click tracking, it will track your affiliate link clicks as events in Google Analytics:
These will then show up in Analytics, go to Content > Event Tracking > Categories, and you’ll see something like this, as you can see the affiliate links have been suffixed with the label “aff” I chose above:
Good luck making some money on affiliate marketing, and make sure to hide those affiliate links!