AffiliateBeginnersGuide
Affiliate marketing for beginners

chclipart image
More Info »
| RSS Feed | sitemap | Contact 

» Home » Affiliate Links Guide » Affiliate links cloaking


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" their PC.
Live example is one mail I got some time ago. Person was asking why there is no any link on one product page. Link was there, but she has some kind of firewall installed. Parsing pages, that firewall disables every affiliate link found. That is only one example.

For many of those newbies every url what is not looking natural, what means every url with some numbers or question marks after domain name, is looking suspicious, and they will not click on that "scary" link. More reasons you can find in commission hijacking article

To avoid these situations, you need to mask affiliate links.


JavaScript cloaking

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:

Link Title

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.

There are more tricks, encryption using JavaScript for example, but this simple OnMouseOver cloaking in most cases shows good response, when live visitor is in question. Better results are when, instead of "AnyTextHere", some url is added, say, real url to merchant's website, it is then looking naturally.

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.
Make simple HTML page and add refresh tag to header, between
<HEAD> and </HEAD>

<META HTTP-EQUIV="refresh" CONTENT="0; URL=http://YourAffiliateUrlHere">

Some browsers can stop on redirection page, be sure
to add your affiliate link there too, in body of that page.

Also, some search engines could have a problem with indexing
redirection pages, it will be good to add link to main page
there, and additional meta robots tag - NoIndex, NoFollow.

Now, upload that page to any directory, and add a link to
that page, so it is looking like:

http://www.yourdomain.com/redirectionDir/redirectionPage.html

One more option is to make a new directory and upload redirection
page renamed to index.html (default page)
In that case, page can be called like this:

http://www.yourdomain.com/redirectiondir/ (or without slash)

Index.html will be loaded automatically, and visitor forwarded
to your affiliate url.

It is possible to use javascript redirection (window.location.replace) in combination with above meta tag, but keep in mind that search engines are considering any redirection fishy. Like anything what was used from spammers in the past, javascript redirection can affect your site ranking.


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 .

<?php
header("HTTP/1.1 301 Moved Permanently");
header("Location: http://Your AffiliateUrlHere");
exit();
?>


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.


Redirection services

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/
it was possible to use redirection, for example,
http://go.to/yoursite

go.to above is only example, but using redirection services,
it is possible to hide affiliate url, and count clicks.
One of popular redirection services is tinyurl.com


Domain redirection

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.







affiliate links cloaking

to top