Amazon affiliate links cloaking

Summary:

Amazon affiliate links cloaking is a simple technical solution that allows to simplify cloaking Amazon links compared to the generic affiliate link cloaking patter.

Name of the pattern:

Amazon Affiliate Link Cloaking

When to use the pattern:

When you have multiple Amazon affiliate program links on your site.

How to use the pattern:

Many Amazon affiliates use links and ads automatically generated by the Amazon Associates site. However, there were reports that occasionally they are generated incorrectly and don't result in the sales properly accounted for. The word on the street is that the correct Amazon affiliate link has a form http://www.amazon.com/dp/ASIN/?tag=YOURAFFILIATEID, for example, http://www.amazon.com/dp/0471469122/?tag=httpwwwgalien-20 I verified that type of links and they indeed work.

Of course, such simple structure of an affiliate link is widely open to so called stealing affiliate sales, when your affiliate ID is removed or replaced. Hence, link cloaking becomes even more important. However, considering that most Amazon affiliate sites promotes multiple products, making individual redirects for all of them is complicated.

Instead you will be able to use the links looking like:

http://yoursite/asin/ASIN

by creating "asin" folder on your server and placing just two files into it. The files are .htaccess (if you run under Apache server as most people do) and index.php. You have to have module rewrite enabled and php available to use this.

.htaccess file:
>>>> CUT HERE >>>>
#
# Amazon affiliate links rewrite rules
# (C) http://www.InternetMarketingPatterns.com, 2009
#

RewriteEngine on

# Rewrite URLs of the form 'x' to the form 'index.php?asin=x'.
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /asin/index.php?asin=$1 [L]

<<<<<<<<<<<<<<<<

index.php:
>>>> CUT HERE >>>>
<?php
//
// Amazon affiliate links rewriter
// (C) http://www.InternetMarketingPatterns.com, 2009
//

$amazonId = "httpwwwgalien-20";

if (!empty($_GET['asin'])) {
$link = "http://www.amazon.com/dp/" . $_GET['asin'] . "/?tag=" . $amazonId;
}
else {
$link = "http://www.InternetMarketingPatterns.com";
}

header("Location: " . $link);
exit();
?>
<<<<<<<<<<<<<<<<

Attribution:

I've put it together while building some of my commercial sites.

Related patterns:

Affiliate Link Cloaking, Affiliate program, CPA

Related anti-patterns:

None

Details and comments:

The best thing about this pattern, is that you just put these two files in, and then a link to the new Amazon product becomes just a matter of slapping ASIN number to the end of http://yoursite/asin/

If you do Amazon affiliate sites, you certainly would appreciate that pattern.

08 Nov11:59

answer this post

By Anonymous

I do guess that it’s not bright solution to waste valuable time creating the custom essay. Lots of people go another way! They do not write the non-plagiarized essay by their own. They just pay for an essay now in the innovative essay writing service.

19 Apr03:04

I was wondering if you would

By Anonymous

I was wondering if you would like to be a guest poster on my blog? and in exchange you could include one link the post? Please reply when you get a chance and I will send you my contact details - thanks.
inttentive add|
add/adhd self help|
test digonosis|
adhd treatment|
does my child have add or adhd

15 Feb07:16

Internet partner marketing is

By Anonymous

Internet partner marketing is most important ca less and most classic work this most is most interesting and nice
curt
nike blessings

Text of articles (CC) Internet Marketing Patterns, 2009. Layout and graphics (C) Internet Marketing Patterns, 2009. All Rights Reserved.