affiliate marketing

There are several methods of Redirecting or Cloaking Affiliate Links and this article while not being comprehensive does attempt to address some of the more common ones.

Method 1 Using Meta Refresh

Create a file such as redirect.html and include in the header the line below replacing youraffiliatelink.com with the link you require, upload to your root directory.

meta http-equiv=”refresh” content=”0;url=http://youraffiliatelink.com?a=1234″

Optionally you can also include a title tag.

Call up the redirect with this link http://www.yoursite.com/redirect.html

The main disadvantage of this method is you need a separate file for every redirect.

Method 2 Using PHP

Create a file for example redirect.php and upload to your root directory

php

$links = array(
“link1″ => “http://youraffiliatelink.com?a=1234″,
);
header(“Location:”.$links[$_GET['site']]);
exit;

?

You can replace link1 & http://youraffiliatelink.com?a=1234 with whatever you want. You may also add as many other affiliate links below this one as you want.

Call up this redirect using this link http://www.yoursite.com/redirect.php?site=link1

Method 3 Using .htaccess

My personal favorite method for redirection is using a .htaccess file.

Place the following in your .htaccess file and upload to the root directory

Redirect 301 /link1 http://youraffiliatelink.com?a=1234

You may add other links below the first as required

To call up this redirect use the following syntax

http://www.yoursite.com/link1

Share and Enjoy:
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • Affiliates4u