How to Cloak Your Affiliate Links and Make More Money
I’m pretty sure that many of you know how cloaking your affiliate links can double, or even triple your conversions. But have you ever wondered how or why?
Why? Simply because when a potential buyer sees that ugly referral link he is about to click, it will immediately hit him that you are only promoting the product to make a quick buck.
But seeing a URL that looks like this: john.com/go/google.php will most probably cause him to click the link without thinking twice.
How? Although there are numerous ways to cloak an affiliate link, I find that using a PHP redirect works best. After you finish reading this post, you’ll know how to create links like the one above and redirect them to your affiliate page.
Step One
Create a new directory in the root of your website (public_html) with the name you’d like to appear in your cloaked affiliate link.
For example, if you wanted your link to look this: john.com/go/google.php, then create a new folder named “go”, or “recommends” if you want it to look this: john.com/recommends/google.php
Step Two
Now that you’ve created your new folder, open your favorite text editor and paste this code into a new file:
<?php
header('Location: http://www.youaffiliatecodehere.com/');
?>
Substitute the URL with your own affiliate and then save the file as filename.php (eg. hosting.php) That’s it, just repeat the second step to make as many cloaked affiliate links as you’d like.
The reason why this method works better than a .htaccess redirect or JavaScript code is because you can link to the file on other websites and can change the content of the file without having to worry about changing each individual URL.
This tactic probably won’t do you any good in the Internet marketing niche, as its members are constantly on the lookout for these tricks, but it will most certainly work wonders in the other niches.
affiliate, cloaking, links, money






33 Brilliant Reader Comments, Comment or Ping
Swastik
G’dang!
I was just searching for this, thought it was a plugin.
Helpful post for me, thanks!
Dec 5th, 2008
the Blogoholic
Swastik - I actually wrote this post because of the question you asked me yesterday!
Dec 5th, 2008
Klajdi Hena
That actually is pretty cool. I had no idea on how to do this.
Dec 6th, 2008
the Blogoholic
Klajdi - I’m glad you found it useful!
Dec 6th, 2008
Swastik
Rajaie, Wonderful gesture, mate.
Thank you!
Dec 6th, 2008
Brian D. Hawkins
Nice post Blogoholic. There are a few programs that will simplify that process but you outlined a nice free way of doing it. Thanks for sharing.
Dec 7th, 2008
arun
There is also a pluggin for this to do thing simple rather than to create php files.. Its called gocodes.. a remarkable plugin i use.. it can mask links n shorten url.. check my site for how i mask it.try it.. u ll lik. have fun!!!!
Dec 7th, 2008
the Blogoholic
Swastik - No problem.
Brian - I don’t think that a program could simplify the process - maybe make it easier and faster, but not “simpler”
Arun - There’s also a plugin called Affiliate Ninja, but most of these plugins are expensive, will check yours out right now…
Dec 7th, 2008
arun
Wat i said was free.. u can download from wordpress.org
Dec 8th, 2008
Ganesh - Online Bull
Good tip. Till now, I have preferred using .htaccess redirects but this one is nice too. The only thing that matters is that the link should look good enough for the user to click on it.
Keep up the great content.
Dec 8th, 2008
the Blogoholic
arun - I know, I was just mentioning some other similar plugins
Ganesh - .htaccess are pretty nifty and easier to maintain; I guess it just depends on your personal flavour.
Dec 8th, 2008
Donace
Don forget to noindex / nofollow the pages though! I personally use the following layout:
WebSite Name
window.location=”http://thelink”;
You are being taken to the correct page.
If the page doesn’t load after 5 seconds,
click here.
Dec 9th, 2008
Donace
seems like the comment box ate the code :p so here it is again get rid of all the *
Don forget to noindex / nofollow the pages though! I personally use the following layout:
WebSite Name
wind*ow.loc*ation=”htt*p://thelink”;
You are being taken to the correct page.
If the page doesn’t load after 5 seconds,
click here.
Dec 9th, 2008
Donace
dammit raj just hit me up on msn when you read this!
Dec 9th, 2008
the Blogoholic
Donace - Hehe, I’ll just buzz you on MSN
Dec 9th, 2008
Dinh Trung
That’s a great tip !
Could you advise could we do with blogger ??
Dinh Trung
themondey.info
Dec 12th, 2008
the Blogoholic
Dinh - You can do it with blogger by uploading the php file on a separate free host and then linking to it.
Dec 12th, 2008
Dinh Trung
Hallo, I’m not familiar with .PHP
Could pm to advise the procedures ??!!
Thanks for your kind supports in advance !
Dinh Trung
themondey.info
Dec 12th, 2008
the Blogoholic
Dinh - You can find out how to create the redirect by reading the post.
Dec 12th, 2008
Dinh Trung
Hi, it does not work in my case.
I created .PHP file with notepad (then tried with wordpad) and upload to my host at 110mb, but it does not work !!!
Please help to advise !!
Dinh Trung
themondey.info
Dec 13th, 2008
the Blogoholic
What does not work? Does it redirect you at all? What happens when you try access the file?
Dec 13th, 2008
Dinh Trung
I create .php file with notepad, it’s automatically add “.txt” end of the file once I saved. And add “.rtf” if I use wordpad.
I upload the file to 110mb, then rename by deleting “.txt” and/or “.rtf” but it still not work !!
Dinh Trung
Dec 13th, 2008
the Blogoholic
Dinh - Ah, I see the problem. When you are saving the file, you have to select the “All file types” option in the file format field.
Dec 13th, 2008
Wei Liang | ABloggerBlog
That is something new I have learnt. Pretty neat but what is the difference between this code and using the Gocodes plugin?
Wei Liang
Dec 13th, 2008
the Blogoholic
Wei - No difference really, except that you can us the method discussed in this post for even non-WordPress sites/blogs.
Dec 13th, 2008
Money Whiz
If you are in the internet marketing niche, I usually find it is better to not hide your affiliate link and just be upfront about. If you say something like: “here is my affiliate link” then I’m pretty sure people won’t mind.
Dec 14th, 2008
Dinh Trung
Blogoholic,
It’s ok now. However, it should be better if we could hide the affiliate link, then just the original site link apprears
Is it possible ??
Dinh Trung
Dec 15th, 2008
the Blogoholic
Money Whiz - I totally agree with you on that point, it’s only in the other niches that cloaking affiliate links will usually help.
Dinh - Yes, that can be done with Javascript. Here’s a link if you wanna know how: http://www.jeremyreviews.com/2007/11/16/3-powerful-to-cloak-affiliate-links/
Dec 15th, 2008
Student Loan Consolidation
I am using .htaccess file to redirect all affiliate links
Jan 3rd, 2009
ireng_ajah
Nice article..
All about affiliate programs
http://moneylocker.blogspot.com
Jan 24th, 2009
Xenon
It what i looking for thanks mate!
Feb 15th, 2009
Daily Healthy Choice
Nice, it makes it easier than having to change a bunch of affiliate links on hundreds of posts if the affiliate isn’t selling well or disappears.
Feb 22nd, 2009
What Do You Think?