How to redirect outbound affiliate links

  • 0
  • August 18, 2007

Most of the top affiliate marketing experts redirect outgoing links. Some use a tracking script to track click volume but the main benefit is that your visitors are not immediately aware that the link is an affiliate link and the search engines don’t see that your site is just an affiliate site.

There are loads of affiliate link management scripts on the market but I’ve never seen one that was simple so I decided to release my own ultra simple version.

This script will create links in the format www.yoursite.com/go/amazon.php

Add the following code to your .htaccess file:


RewriteEngine on
RewriteRule ^go/(.*).php$ go.php?id=$1 [L]

Download this file and change the file extension from .txt to .php

Edit the links in the go.php file to include your affiliate links, adding more as appropriate. Upload go.php to your web server.

Cloaking

This script includes some code to identify search engine spiders and redirect them to your homepage rather than an affiliate link.

Cloaking content for search engines is against their guidelines so you should use this at your own risk.

If you don’t want to cloak for the search engines use this version of the code instead.

Patrick Altoft

About Patrick Altoft

Patrick is the Director of Strategy at Branded3 and has spent the last 11 years working on the SEO strategies of some of the UK's largest brands. Patrick’s SEO knowledge and experience is highly regarded by many, and he’s regularly invited to speak at the world’s biggest search conferences and events.

Like what you see? Talk to an Expert