In the previous post we looked at the problems caused by exposing affiliate links. In this post I give you 4 methods to hide your long and often complex affiliate link with a short link.
1. URL shortening service
A URL shorting service takes in a long URL and gives you a short URL. bit.ly and tinyurl are examples of URL shortening services. Using a URL shortening service is quick and easy. URL shortening is ideal to share affiliate links on social networking sites such as Twitter and FaceBook.
2. Use 301 redirect in .htaccess file
301 redirect provides a way to specify that URL A has been permanently redirected to URL B. In our case URL A is the short user friendly URL and URL B is the long affiliate link. To create a 301 redirect edit the .htaccess file (which can be found in the root directory of your website) and add the following line of code.
redirect 301 ebook http://VeryLongAndComplexAffilateURL.com
Assuming your domain name is techthinker.com, the above redirect will allow you to access the affiliate URL using the short URL http://techthinker.com/ebook
3. Using a php jump script
Add the following code into a file called products.php and save the file in your website’s root directory
<?php
if ($item==”ebook1”) {$link=”http://VeryLongAndComplexAffilateURL.com/ebook1.pdf”;}
if ($item==”ebook2”) {$link=”http://VeryLongAndComplexAffilateURL.com/ebook2.pdf”;}
header (“Location: $link”);
exit();
?>
Assuming your domain name is techthinker.com,
http://techthinker.com/products.php?item=ebook1 is used to access affiliate link for ebook1 and
http://techthinker.com/products.php?item=ebook2 is used to access affiliate link for ebook2
4. Using a WordPress plug-in
If you are a non technical personal and would like to hide your affiliate links in your WordPress blog then you should consider installing a plug-in to redirect your short URL to the long affiliate URL.
GoCodes is one such plug-in that allows you to easily specify source and target links using a user friendly web interface. GoCodes allows you to track the number of times the affiliate link has been accessed. This plug-in also allows you to specify the nofollow attribute for your link redirection.
Do you know any other ways to hide an affiliate link? Please share them in this page.








