Recently I decided to limit the number of guest posts on my site. But this is the first time I specifically ASKED for an article.
The other day Cristina Ansbjerg of Optima Lifestyle left a great comment about how to cloak affiliate links.
I feel this is a majorly important technique that every affiliate marketer should learn. That’s why I practically begged Cristina to write a quick tutorial. And here’s what she’s come up with…
A few weeks ago Steve posted a very useful article about How to Bypass an Opt In Page.
He created a video to explain very easily how to cloak your affiliate links using a free tool, G-Lock Affiliate Link Cloaker.
This topic is extremely important for affiliate marketers since cloaking your links is a technique you can use to:
- Protect your commissions from theft. It’s quite easy to remove your affiliate code from the link and add in someone else’s. This way, that person would get your commissions. Cloaking the link, you won’t disclose your affiliate ID, therefore it can’t be changed.
- Bypass a poor converting opt-in page
- Give a better look to the ugly and long affiliate links. Also, your customer doesn’t have the feeling they are leaving your website.
Besides the free G-Link affiliate link cloaker, there are other premium plugins in the market. You can also use a URL shortener (e.g. bitly, TinyUrl).
But all these solutions have something in common: they are external. What would happen if for some reason you need to uninstall the plugin?
In this post I’m going to give you another option. I’m going to explain how to manually cloak your links. This way you will have total control over your links.
What are we going to do?
We are going to simply redirect the affiliate links through our blog.
A link that looks like this: http://XXXXXX.nobsoffers.hop.clickbank.net, will now look like this: http://yourblog.com/recommends/nobsoffers. Note that the final destination is not going to change.
For example, if I was promoting Steve Scott’s product “Affiliate Marketing without the Bulls**t” in my blog, Optima-Lifestyle, my affiliate link http://optimacbid.nobsoffers.hop.clickbank.net would turn into
*(Note: optimacbid is not my actual Clickbank ID. It’s just made to illustrate this post)
What do you need to cloak links manually?
All you need is:
- A text editor (e.g. Notepad if you are a PC user)
- FTP Client (e.g. Filezilla is free)
Let’s start!
STEP 1
Open your text editor and paste this simple piece of code:
<?PHP
Header(“Location: YOURAFFILIATELINK”);
Exit;?>
(Important: Don’t leave any space after ?>
That would break the php code).
STEP 2
Change YOURAFFILATELINK for your actual affiliate link. The one you want to cloak. In my example, the piece of code would look like this:
STEP 3
Create a folder on your desktop called recommends
STEP 4
Inside the Recommends folder, create another folder. Give it a name that allows you to identify the affiliate product. Don’t use capital letters.
I’m going to call mine nobsaffiliatemarketing
STEP 5
Go back to the notepad and save the text file you’ve created in this new folder. The text file has to be called index.php (Always. No exception. Don’t try to call it anything different)
recommends —> nobsaffiliatemarketing —> index.php
Let me insert a short explanation here:
Every time you cloak a new link you will have to save it in the recommends file and then in the specific folder. For example, imagine that now I want to cloak my affiliate link for Hostgator as well. All I would have to do is repeat the previous steps -this time with my Hostgator affiliate link- and then save the text file as index.php in a folder called hostgator inside the recommends folder.
My recommends folder would look like this:
STEP 6
Once the recommends folder is ready, all we have to do is upload it to the root of our server using Filezilla (or any other FTP client).
(The root of your server is usually called public_html or httpdocs)
I’ve included a picture (please ignore that Filezilla is in Spanish)
STEP 7
Check carefully that the index.php files are named like that and not index.php.txt
If they’re not correct, simply delete .txt
Voilà! Your affiliate links are now cloaked. To be sure that you’ve done everything right, simply type the url into your web browser and press enter.
Let’s check if mine works http://optima-lifestyle.com/recommends/nobsaffiliatemarketing
We can also try using an anchor text: Steve Scott’s Affiliate Marketing without B.S.
This system is very useful if at some point you want to change an affiliate link that you’ve used many times in different places (e.g. many posts on you blog).
In that case you only have to change the link saved on your recommends folder. With one simple change you control all the redirections for that link.
A big thanks for Cristina for creating this step-by-step tutorial. To learn more about her, I recommend you go check out her site which covers personal development for entrepreneurs.
{ 40 comments }


Email marketing is the lifeblood of my Internet business.


