INCLUDE_DATA

Article written

  • on 23.11.2008
  • at 05:31 PM
  • by Rory

How To: Cloak your Affiliate Links for Free in Under 3 Seconds 3

Nov23

As Internet marketers, we all use affiliate links in some way or another. For some, they might be embedded into blog posts, while for others in landing pages or forum signatures. Regardless, affiliate links serve a necessary evil when making money online and we depend on them.

Introduction to Affiliate Link Cloaking

To improve the effectiveness of affiliate links, Internet marketers often “cloak” their links. For example, on my blog, I’ve cloaked my affiliate link to Market Leverage.

Cloaking changes the URL from

http://trendsbiz.com/a.php?a=CD11894&b=25367&d=470782&l=0&o=&p=0&c=4110&s1=&s2=&s3=&s4=&s5=

to

http://www.roryhansen.ca/recommends/marketleverage.php

Benefits of Cloaking your Affiliate Links

This has a number of benefits, including but not limited to:

  • Prevention of affiliate link hijacking
  • Increased professionalism through attractive affiliate link presentation
  • Increased click-thru rate
  • Improved search engine optimization, because Google doesn’t like affiliate links

How to Cloak your Affiliate Links

There are a number of high-quality products out there to help manage affiliate links, probably the most notable being the Ninja Affiliate Plug-in for WordPress.  These products can cost nearly $100 to purchase, and while that might be pennies in the jar for many Internet marketers, for those just starting out on the making money online scene, $100 can be a rather large investment. For that reason, this blog post isn’t about those expensive products.

The purpose of this blog post is to show you how you can cloak your affiliate URLs yourself, for free, and in just a few seconds.

To do this, we’ll be using PHP, and in a nut shell, creating a PHP file on your web site that will redirect the user to your affiliate link.

Note: This is a very simplistic example, that does not contain any click logging and should probably not be used to manage more than 10 – 15 affiliate links. If you require a heavy-duty solution, you should consider the Ninja Affiliate Plug-in, or some similar product.

Note 2: To make an even more attractive affiliate link structure, it’s possible to use more advanced techniques, like creating a .htaccess file and specifying your URL format. But, that topic is out of scope for this post, too.

Anyway, let’s get started.

Step 1: Determine how you want your links to look

If you scroll up, you’ll notice that in the example, I decided that I wanted my affiliate links to take the form:

http://www.roryhansen.ca/recommends/productname.php

I’ve used the word “recommends” in the link to further “sell” the link. Many other famous IM’s use this same naming convention. Others have used similar naming conventions, such as:

http://www.roryhansen.ca/go/productname.php

http://www.roryhansen.ca/goto/productname.php

It’s really a personal choice, but you’ll need to decide that now before you proceed.

Step 2: Create a new subdirectory on your website

Using your favourite FTP program, connect to your website’s FTP server. In your base web site directory, you’ll need to create a new directory to store all of your cloaked affiliate link files.

In my example, the new directory I created was called “recommends”. This is what enables the cloaked affiliate link format I decided upon.

Step 3: Create your cloaked affiliate link file

In a text editor like Notepad, cut-and-paste the following code:

<?php
header(’Location: YOUR_AFFILIATE_LINK_URL_HERE’);
?>

Replace YOUR_AFFILIATE_LINK_URL_HERE with the actual affiliate link for your product.

Save the file using a friendly filename, to represent the product you’re advertising. In reference to my earlier example, I saved my file as marketleverage.php.

Step 4: Upload your cloaked affiliate link file

Again using your FTP program, upload your new cloaked affiliate link file into the new folder you just created.

And you’re done!

So, how does this work?

In your blog posts, you’re now going to link to the new cloaked affiliate link file you just created. For example, you might write:

Click here to sign-up for <a href=”http://www.roryhansen.ca/recommends/marketleverage.php”>Market Leverage</a>.

The code in the file tells the browser to redirect the user to the URL you included into the file.

User clicks on link –> Browser goes to marketleverage.php –> Code tells browser to redirect user to the real affiliate link.

And there you have it, your first cloaked affiliate link.

Happy affiliate marketing!

subscribe to comments RSS

There are 3 comments for this post

  1. Terence says:

    You can also create a folder with the name of the product and put the php file inside and name it index.php. This is a little neater but does require a folder for each product, so might not be so good if you are promoting lots of them.

    If you like to add multiple Clickbank tracking ID’s for each product it can become a little messy too.

  2. Xenon says:

    It work for me! Thanks!

  3. Phil says:

    This is the php file:

    and the error:

    Parse error: syntax error, unexpected ‘:’ in /home/wwwphil/public_html/recommends/swom.php on line 2

    Hope you can assist
    Thank you and God Bless!

Please, feel free to post your own comment

* these are required fields