If you’re into Affiliate Marketing, you should know the benefits of cloaking your Affiliate Links. The main benefit is obviously that users can’t remove your affiliate link from the URL (Meaning you could lose out on the commission). This is mainly aimed at the Webmaster niche where users know all about Affiliate Links.
Here are some methods of Cloaking Affiliate Links you could do.
Method 1 - iframes
One of the most common methods you could do is to make an iframe on a webpage. Use the following code and put the whole code into a HTML file:
<html>
<head>
<title>TITLE TAG</title>
<meta name=”description” content=”META DESCRIPTION” />
<meta name=”keywords” content=”META KEYWORDS” />
</head>
<body>
<iframe src=”YOUR AFFILIATE LINK” width=”100%” height=”100%” frameborder=”0″ scrolling=”yes” />
</body>
</html>
You should know what to insert for all of the places you need to input. The title, Meta Description and Meta Keywords are all to help with your SEO. The YOUR AFFILIATE LINK is for you to put your affiliate link on. Once you’ve set that up, all you need to do is advertise that page. You shouldn’t see any borders or anything so it looks like a normal page, and users can’t remove the affiliate link. This will definitely help.
Method 2 - HTML/PHP/.htaccess Redirects
Another method you could do is to use a PHP Redirect or a HTML Redirect and advertise to that page. This achieves the same as the iframe but it is easier to get around because users may still be left with some sort of affiliate in the URL, it depends on the Affiliate. This is good if you don’t want to use an iframe. You could use it as:
<?php
Header(”Location: YOUR AFFILIATE LINK”);
?>
Obviously replacing the YOUR AFFILIATE LINK with the affiliate link. Or, you could do it via HTML like so:
<html>
<head>
<title>Redirecting…</title>
<META HTTP-EQUIV=Refresh CONTENT=”0; URL=YOUR AFFILIATE LINK”>
</head>
<body>
Redirecting…
</body>
</html>
Theres even another way of doing it. This is via a .htaccess file in your Web Hosting. If you want to do this one, see if there is a .htaccess file in the root of your public files. If not, create one. Now, open up the file and you can use this code to achieve a Redirect:
Redirect / YOUR AFFILIATE LINK
That code would redirect everything to the Affiliate Link. This isn’t a good idea if you have other redirects or other pages/subdomains hosted because this would probably make those Redirect too. The best thing to do would probably be this:
Redirect /index.html YOUR AFFILIATE LINK
Or maybe even Redirecting a page that doesn’t exist (You could do this):
Redirect /affiliatelink1.html YOUR AFFILIATE LINK
For the PHP code; this should redirect straight away and probably not show the Redirecting text. Both PHP and HTML do the same job so it doesn’t really make much difference which one you use.
Method 3 - Redirect Services
Another method you could use for Cloaking your Affiliate Links is like the one above, but you don’t need to Web Hosting or to use HTML or PHP.
You again are going to do a redirect, but you can use a URL Redirect Service like TinyURL to achieve it. This one stops the hassle of setting everything up, but the only problem is that you can’t really achieve SERPs with it, so this isn’t really recommended.
Now for the next method!
Method 4 - Clever Javascript Hides
This is a pretty clever method we discovered earlier. It does involve HTML again, but it involves changing the text through Hyperlinks. For example, look at this code:
<a rel=”nofollow” href=”http://www.milofi.com/hosting.php?affiliate=fjfjfjfjfjfjffj” onMouseOver=”window.status=’http://www.milofi.com/hosting.php’; return true;” onMouseOut=”window.status=”; return true;”>MiloFi Hosting</a>
Obviously that affiliate link given doesn’t work, its an example. If you try that code, you should see the normal hosting.php link in the status bar (Hiding the affiliate section) but when you click it, it will bring them to the actual Affiliate Link, with them thinking there is no Affiliate Link in. This is a recommended method. Obviously the things you need to change is the href (Change to your affiliate link), change the onMouseOver window.status to the page where the affiliate link is going to take them to anyway (So it looks normal) and then change the MiloFi Hosting part to the correct Anchor Text of the link. That is all you need to do. Just use that code from then onwards and its all fine.
Method 5 - Affiliate Link Encryption Software
The final method we are going to describe is using an Affiliate Link Encryption software. This should hopefully cloak the link completely.
We aren’t recommending any because we’ve never tested them, but they seem to be recommended by a lot of other people. Most of the decent encryption software are paid software however, so you may have to spend a few dollars if you want to completely protect your links. But just think - Whats a few dollars on a software that could save you hundreds of dollars in commission?
Thank you for reading this guide, hopefully you will have learnt a lot about Cloaking Affiliate Links to increase commissions.
Related Posts:- Google’s Take on Outgoing Links...
- 301 Redirect...
- Make Money by Selling Links...
- Buying Signature Links...
- How Google treats Inbound Links...
Related posts brought to you by Yet Another Related Posts Plugin.



