
- Image via Wikipedia
Cloaking your affiliate links is easy and there are various ways to do it. In this post I am going to show and explain exactly how I do it.
Firstly…..
What is Link Cloaking?
Cloaking, Link Cloaking, URL Cloaking, Hiding Your Affiliate Links or Affiliate Link Cloaking are all basically the same thing.
You are creating a redirect from one link to another, thus hiding the destination link from the person who clicks. This can be used for good and bad purposes, I suggest you use it for good!!!
If I wanted to promote a product on my blog….. Say for example the excellent plugin OIO Publisher, then in order for me to earn my affiliate commissions I need to send people to the sales page using my affiliate link.
When you hover over these two links, take a look at the link text in the bottom of your browser.
Control Your Ad Space, Get OIO Publisher Today
Control Your Ad Space, Get OIO Publisher Today
The top link uses the raw affiliate link, as you probably know some affiliate links get really ugly and obvious… this one isn’t too bad:
http://www.oiopublisher.com/ref.php?u=954
The bottom link uses the more appealing and personalized cloaked link:
http://realbloggingtips.com/recommends/OIOPublisher.php
A pretty link is just one advantage of cloaking your links. Here are some of the other advantages:
- Your affiliate link is hidden from the reader and a nicer link is in place, thus the link looks more professional and trustworthy.
- People in the know are less likely to strip your ID before they purchase the product.
- Malicious software should not be able to strip your affiliate ID and steal commissions from you
- If your affiliate link changes you only need to change it in the cloaked file and it will reflect in every instance that you have referenced the cloaked link.
How to cloak your links….
- Create a folder in your blogs directory. This can be done via ftp or file manager on your web hosting page. In my case I named the folder recommends. So now that folder can be found here: http://realbloggingtips.com/recommends/
- Open a plain text editor and copy and paste the code below into the editor.
<?php header( “HTTP/1.1 301 Moved Permanently” );
header(‘Location: http://www.YOURAFFILIATELINK.com’); ?> - Replace the code “http://www.YOURAFFILIATELINK.com” with your affiliate link. In my example above my affiliate link was “http://www.oiopublisher.com/ref.php?u=954“
- Save the file with an appropriate name followed by .php. In my example I named the file OIOpublisher.php. If you was promoting a gas card then you could name it FreeGasCard.php, as another example.
- Upload the file to the folder that you created on your web host and test the link. In my case the link is: http://realbloggingtips.com/recommends/OIOPublisher.php
- Use this link whenever you want to direct a reader to the product or offer via your affiliate link.
If you want to create a new link for a new product then just copy the php file that you created, rename it (remember to keep the php and don’t use spaces, – are fine). Then open the file in a text editor and replace the affiliate link with the appropriate link.
I keep a generic copy of this file named “CloakedLink.php” on my desktop so I can create a new cloaked link in a matter of seconds.
The Wordpress Plugin Option: If you like the idea of cloaking your links but don’t want to bugger around with php files and uploading every time you need to link you can use a great wordpress plugin to easily spread cloaked affiliate links throughout your blog. Check out Wordpress Link Cloak.
Hope that helps
Any questions please let me know.
Related posts:
- 1,2,3…. Now You’re An Affiliate Marketer
- 1,2,3…. Now You're An Affiliate Marketer
- Musically Motivated Monday – $1 for what???
- What to do When Affiliate Programs Don't Pay
- Info Product Success Formula, Is It Any Good?

Nice one Ben!
The Wordpress-plugin is already working on my site!
But I installed a free plugin that does almost the same! http://w-shadow.com/blog/2007/09/19/link-cloaking-plugin-update/
Ahh cool I will have to check that out. I have never used the plugin I was showing but was recommended it by another blogger I trust so thought I would just show a link to it at the bottom… I’ll check out that plugin you use for sure.
For me doing it manually is simple enough though…. I do try and keep the number of plugins used to a minimum so that the database stays clean.
I feel that’s it’s not really fair. I mean people need to know that what they’re clicking is an affiliate link. Maybe some people will use it with good intentions but most of them will use it to trick people into buying through their affiliate links.
Thanks for stopping in,
One of the main reasons for doing it is because it keeps things clean and tidy and easy to manage.
I always recommend products that I either have been recommended on trust or use myself. It’s not worth my time conning some person into a bad sale and then losing my reputation.
Cloaked links or not, bad apples will always find a way to con people
.
This is not a matter of link structure but of site content. A site can and should contain a disclosure policy. And people should keep their integrity in on what they recommend. But this really has nothing to do with the link itself.
I’ve been using that redirection method for a while now and it looks so much better than messy amazon links and so forth.
Great tutorial as well by the way
Thanks
,
There are other methods including HTML redirects and .htaccess, or all the links in one php file…. but I like this one the best.
I’ve gone a bit lazy in cloaking my links; I usually just create a page similar to what I have detailed here:
http://thenexus.tk/update-links-love-2/
and just use seo smartlinks to populate the keyword throughout the site.
That’s a pretty nice way to cloak the links… if you don’t want to use PHP.
I don’t know much about seo smartlinks, how does it work?
you can grab it from here: http://www.prelovac.com/vladimir/wordpress-plugins/seo-smart-links
What it does is add a link to a said keyword…so whenever I mention ‘hosting’ it auto links that word to my hostgator affiliate link etc etc
That’s a really nice plugin…. I saw something somewhere else that actually scans your text and places in affiliate offers from an offer directory but I think this would get a bit hard to manage and it may start promoing offers you don’t agree with.
This plugin though, looks very useful. Have you had much luck with conversions?
I use it more for cross linking posts; though conversions do occur though more based on the post then the linking out.
I’m new to this blog. Apologize for asking this though, but to OP…
Do you know if this can be true;
http://www.bluestickers.info/ringtones.php ?
it came off http://ringtonecarrier.com
Thanks
Now this is the perfect method to cloak affiliate links. Thank You!
Bo problem Door Knocker. Thanks for reading.
I think it will be a good idea for it.i will use it surely.thanks to sharing this useful information.
No problem.
[...] PS: I recommend cloaking your affiliate links. I wrote a post that gives some reasons and shows you how here: How To Cloak Affiliate Links. [...]
Interesting but the question is if you cloak your affiliate link, and a person clicks on your link and makes a purchase how can the merchant tell where the customer came from if you cloaked your affiliate link Id.
Hey, the cloak simply sends through to the correct link. It’s only cloaked on the side of the web site but it then becomes the correct link.
That’s why its called “cloaking” the links. If all we were doing was changing the links to non-affiliate links it would not be called “cloaking.”
Thanks for jumping in Anna
This link is just a redirection. The final link that goes to the merchant site is your affiliate link.
A purchase how can the merchant tell where the customer came from if you cloaked your affiliate link Id.
If you read the post properly you will see that it is purely a redirect… hence being called a cloaked (covered) link.
There are various methodologies to promote and affiliate your marketing strategies as according to the concerned situations.
[...] How To Cloak Affiliate Links Do it today. Bill [...]
Is this plugin compatible with all wordpress themes?
Thomass last blog post..Excercises to increase penis length
Hey Thomas, this is not a plugin but rather a way to cloak links that will work with any website…. The plugin linked at the end will work with any theme as far as I know.
Excluding twitter for the moment, why not use an existing paradigm to deal with affiliate links – semantically as microformats?. Something as simple as rel=”affiliate” might be sufficient. A more complex microformat might identify the advertiser or network (a la rel=”license” microformat”).
This way, the small percentage of people who may be concerned can download the inevitable plugin if needed, management and links to privacy and disclosure pages automated, etc. Of course, the real drivers of this may need to the actual affiliate programs – if CJ for example put this in their auto code generation tool.
As for Twitter, the major URL shorteners like BudURL could simply set up a complementary domain for affiliate/sponsored links and maintain the disclosure on their site via a link preview function. Again, it would help if Twitter then autotagged the URL.
A modest proposal, at least. And requires no one else’s permission to start!
Hey Phil,
Thanks for coming by…. Your proposal is an interesting idea but for the most part I think people will find it a little confusing.
My mthod does not use a plugin and simply keeps things easily organised inside a folder on your hosting account. New links can be created in seconds and old links can be easily updated.
Your approach is actually simple – except that there is a greater pushback on link-cloaking and even possible additional FTC regulation coming. Affiliate programs themselves may even decided to restrict cloaking. With a semantic approach disclosure options and functionality can be backfilled into a site much more easily.
The other problem I think is, as simple as your approach is for folks like me who swap and move files all the time, a surprising number of non-technical web site owners hardly ever do this.
I really hope those regulations do not get pushed as I use my cloaking for management of links also…. If I want to link to a keyword say “Best Article Submitter”… I may change my mind in 2 years so want to be able to update the link universally by changing one file.
Hopefully my tutorial will show the folks how simple it is and if people have issues I will sort them out no problem.
One more thought – have you looked at BudURL? Its a link shortener and allows you to do what you are accomplishing without modifying server files – you can create a link like http://budurl.com/siteriver and make it point to where ever you want. Want to change it? Simply log in and change where it points – and you get full statistics and measurements.
Uncomfortable with using a third-party site? The Pretty Links WordPress plugin (http://blairwilliams.com/customizing-pretty-link-options-part-2/) provides a lot of the same functionality on your own site. It provides a lot more functionality than WordPress Link Cloak and is free.
That plugin looks interesting…. I don’t personally use the link cloak plugin, was just finding an alternative for people that wanted a plugin to do the work.
As for link shortening, I already use this on occasion but not had a lot of use for it.
Superbo Manifesto mate! Superb Article Keep it up
Thanks Ava.
Great post. I just wrote about the same topic. I left out a couple things though.
Some affiliate networks have a tool that does the same thing with a couple clicks. Totally acceptable methods of hiding links. Not a true cloak.
RSBs last blog post..Adding Web Sites To The Bing Search Engine
Thanks RSB
The thing I like about my method is that it’s easy to change the link in one file. Say you have used the link 100 times. One file change changes all of them in one go.
I really loved the way you explained the cloaking procedure so simp0ly for anyone looking at cloaking for the first time. I am very new to all this and find the information useful.
I would like to know is it important to cloack eBay links as its a java script and would i get in trouble with Google for putting the java script links on my new sites. Can you help me with this question.
Hi Claude,
Thanks very much. Ebay have been really militant lately so I am unsure of their current stance on ANYTHING! For now I would not cloak their links and I would only use approved banners and links from them or pepperjam.
Javascript links should be fine if provided. Also my method is perfectly legit, to my knowledge.
Hi every one…just to ask whether cloaking can be done on the free website. I have free websites to advertise and one of it is http://getridvirus.weebly.com……i am really new in this online business. Thank you for your help.
Hi Sadin, try using this kind of service: http://www.freelinkcloaker.com/
I’ve never used it but it looks like it may work.
Thank you forest parks for your suggestion, I will try it soon.
No problem, thanks for coming by.
thank you my friend i am using affiliate but i don’t know how to cloak thanks for your tips.
oes tsetnoc´s last blog ..Palarong SEO Contest 2009 vs oes tsetnoc
A question… How to best cloak your affiliate link (yes I too think php or other redirect is the best way) yet be able to add AWeber and Google java code to keep track of your own stats and not have to rely/100% trust the affiliate owner?
Since there is no tag in the .php redirects? If answered could you please do so as it not only pertains to blog owners but to standard websites as well please as the structures and file systems differ somewhat..
Thank you in advance
John