More Info »
Affiliate link cloaking and redirection - guide
Why we need to hide affiliate link?
There are many visitors around, scared to the death that Internet
is full of viruses, trojans, and spyware, just waiting for them
to click on some link to infect their brand new PC.
So, they are installing everything and anything what can "protect"
To avoid these situations, you need to mask affiliate links.
This is simple MouseOver code, old trick, and that code is hiding real url from visitors only. In page source, real url is still visible.
Live link is looking like this:
As you can see, when mouse cursor is positioned over link title, at browser status bar (bottom) is "AnyTextHere" displayed, not real url. Right click on mouse, and you can see real url.
While this code is working in older browsers, it could be blocked in IE 6.0+ (yellow bar on top of page) when security is set to default, and when you are testing locally. FireFox is ignoring this tag, nothing is displayed on browser status bar
Cloaking with Frames
When using frames on site, open affiliate link in a new window or use _TOP . When opening affiliate link inside frame (to hide affiliate codes in browser address bar on merchant site), affiliate cookie could be blocked, (it is then third party cookie). No cookie set, no commission.
Do not use frames for cookie stuffing, opening merchant's website in invisible way, you could be banned from that affiliate program or from search engines. Keep in mind that your competitors are just waiting to see something illegal on your website...
Redirection with meta refresh tag
Meta "refresh" tag can be used to hide and redirect affiliate url.
<META HTTP-EQUIV="refresh" CONTENT="0; URL=http://YourAffiliateUrlHere">
Some browsers can stop on redirection page, be sure
Also, some search engines could have a problem with indexing
Now, upload that page to any directory, and add a link to
One more option is to make a new directory and upload redirection
http://www.yourdomain.com/redirectiondir/ (or without slash)
Index.html will be loaded automatically, and visitor forwarded
Redirection using scripts
Any server or client script can be used to redirect visitor. From simple redirection (a few lines of code) to redirection using database and with clicks statistic. There are many free redirection scripts available for download, and they can be found using simple search at any of search engines. To avoid that spiders are following your redirections (false clicks), install redirection script in separate directory and block that directory using "Disallow" in robots.txt . Simple link redirection using PHP is below (301 redirect). More examples in use PHP to redirect afiliate link .
Encoding / decoding affiliate url
Did you see that strange url like AcGTdbCEksRmA. That is simple to generate. Just replace A with B, or / with G, or ... What means, one script will generate encoded url, and redirection script must be able to decode string and send visitor to that url.
Cloaking and redirection using htaccess
Added to separate article - Cloaking affiliate links using htaccess , also examples with mod_rewrite.
Shorter url, that is it. When domain names and hosting were expensive, free web hosting was popular. But not free hosting url.
Instead of http://www.freewebhostingcompany.com/sites/~yoursite/
go.to above is only example, but using redirection services,
This is maybe, extreme case to cloak affiliate link. Probably little trick for google adwords to avoid duplicate domains displayed. For example, merchant domain is furniture.com, and if you register nicefurniture.com, that domain can be redirected to merchant site using affiliate link. With new Google AdWords quality rules, landing page on your domain is required. Anyway, if you plan to use domain redirection method, be sure that your domain is redirected using 301 (permanent) redirection.
Affiliate Link Cloaker could help you to cloak affiliate links to avoid links hijacking. No, it is not free, but it is effective.