How to redirect outbound affiliate links

  • 0
  • August 18, 2007
Patrick Altoft

Patrick Altoft

Director of Strategy

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

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.


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.

Free of charge. Unsubscribe anytime.