<?xml version="1.0" encoding="ISO-8859-1"?>
<rss version="2.0">

<channel>

 <title>Professors Coding Corner</title>
 <link>http://www.professorscodingcorner.com/</link>
 <description>The coding corner has tutorials and code snippets in both Javascript and Perl.</description>
 <lastBuildDate>Fri, 16 Dec 2011 19:08:00 GMT</lastBuildDate>
 <language>en-us</language>
 
 <image>
  <title>Professors Coding Corner</title>
  <url>http://www.professorscodingcorner.com/gifs/logo.gif</url>
  <link>http://www.professorscodingcorner.com/</link>
  <width>106</width>
  <height>130</height>
 </image>
 
 <item>
  <title>Why and How to Cloak Affiliate Links | Professor's Coding Corner</title>
  <link>http://www.professorscodingcorner.com/tutorials/cloakaffililatelinks.shtml</link>
  <guid>http://www.professorscodingcorner.com/tutorials/cloakaffililatelinks.shtml</guid>
  <category>cloak affiliate links, cloaking affiliate links, link cloaking, masking url, cloaking link, masking links</category>
  <pubDate>Fri, 16 Dec 2011 19:08:00 GMT</pubDate>
  <description><![CDATA[<h2>Why and How to Cloak Affiliate Links</h2>
<p>What do I mean by "cloaking affiliate links"? This is the practice of taking an often lengthy URL, and disguising it with a masking URL that is both simpler and more attractive.</p>
<p>This affiliate link from Commission Junction:</p>
<p style="margin:-5px 0; overflow:hidden; font:11px normal lucida console; color:#F00;">http://www.anrdoezrs.net/ne8mu2-u1HLKRMLRHJIMPJIK?sid=bamboo_right&url=http%3A%2F%2Fcj.shop.com<br />%2FSupreme%2BBamboo%2B5%2B8%2Bx%2B3%2B3%2B4%2BHorizontal%2BNatural%2BBamboo%2BFlooring<br />%2BPrefinished%2BBamboo%2BFlooring-9135569-1126548-p%2B.xhtml%3Fsourceid%3D23&cjsku=1126548</p>
<p>can be changed into the masking URL:</p>
<p style="margin:-5px 0; font:11px normal lucida console; color:#F00;">http://mywebsite.com/myproduct.htm</p>
<h3>Advantages of masking links</h3>
<ol><li>As mentioned above, the new cloaking URL looks quite a bit better. And whatever you put in place of 'myproduct' can be a lot more descriptive of what the destination is about than was the original URL.</li>
<li>The length of the original link can be so long that browsers are forced to break it into more than one line, as above. This sometimes causes the link, when clicked, to put only the first line of the URL in the address bar, causing an error.</li>
<li>Some people are reluctant to click on a weird link containing lots of numbers, since it looks a bit like a spam link. And amazingly, there is another amazingly large group of people who don't like the idea of another person earning money from their purchase.</li>
<li><p>It has been said that Google does not like affiliate links. I have personal experience with a possible incidence of this. Google actually banned one of my affiliate sites, and wouldn't cite a specific reason for doing so. So I made a lot of changes, including removing most of the affiliate links, and cloaking the rest.</p>
<p>I had just about given up, when 15 months later, I discovered quite by accident that the website had been allowed back on the Google search pages. But they have refused to cite a reason for either the deindexing or the reindexing, so I don't actually know which changes I made to the site were effective.</p></li>
<li>If you need to change the link, either because the advertiser changes it or because you want to feature a different product, it's a lot easier to replace. You only need to change 'myproduct.htm' in one place, not everywhere the link exists on your website.</li>
<li>A savvy internet marketer may recognize the link as belonging to Commission Junction, then sign up with the advertiser as an affiliate themselves, in order to save 50% or more when buying the product. Link cloaking does not entirely prevent this, but in my experience, it helps make it more difficult.</li></ol>
<h3>Methods of masking links</h3>
<p><b>Update, Feb 01, 2012:</b> I am in the process of writing an Ezine Article about methods of cloaking links. In preparation, I tested all of the methods, in both Internet Explorer 9 and Firefox 5. I discovered several things that had changed since I wrote this article, so this section has been completely revised.</p>
<p>All of the methods below show the cloaked link in the status bar of your web page on hover, which is after all what "cloaking" means. But all of the methods but the last two have the disadvantage of showing your uncloaked affiliate link in the address bar of the destination web page. This makes it easy for an unethical person to substitute his own affiliate code, and steal your commission.</p>
<ol><li><p><strong>Meta Refresh</strong>: In this method, you add a META tag to the &lt;head&gt; section of your link-cloaking file, 'myproduct.htm', which tells the browser to go to the affiliate page.</p>
<p style="margin:-5px 0; font:11px normal lucida console; color:#F00;">&lt;meta http-equiv="refresh" content="1; url=YOUR AFFILIATE LINK" /&gt;</p/></li>
<li><p><strong>Javascript Redirect</strong>: This method is much like #1. It uses a script in 'myproduct.htm' to tell the browser to go to the affiliate page.</p>
<p style="margin:-5px 0; font:11px normal lucida console; color:#F00;">&lt;script type=”text/javascript”&gt;window.location = “YOUR AFFILIATE LINK”&lt;/script&gt;</p>
<p>This technique will fail, of course, if the viewer has blocked Javascript, although this practice is rare nowadays.</p></li>
<li><p><strong>PHP Redirect</strong>: Like #2, but your 'myproduct' file must end in '.php', and the following code should be the only content of the file ( NO &lt;head&gt; tag! )</p>
<p style="margin:-5px 0; font:11px normal lucida console; color:#F00;">&lt;?php header(“Location: http://www.the-link-to-redirect-to.com”); ?&gt;</p>
<p>If you don't have PHP available on your server, this method cannot be used.</p></li>
<li><p><strong>.htaccess Redirect</strong>: This method requires you to add just one line of code to your .htaccess file for each affiliate link. It is extremely easy to use this cloaking technique, since you don't need a seperate 'myproduct.htm' file for each link - you can put them all in a single .htaccess file that you probably already have on your site.</p>
<p style="margin:-5px 0; font:11px normal lucida console; color:#F00;">Redirect /myproduct.htm YOUR AFFILIATE LINK</p>
<p>Be sure to make a backup copy of your .htaccess file just in case you mess something up so badly that your website disapppears! ( Note - Dec 19, 2011 - That just happened to me. I mistyped 'Recirect", and I got "File not found" on every one of my webpages! ) Two things to be careful of: 1) there must be a space between the two URLs, and 2) you must use the ENTIRE affiliate link, including the 'http' part.</p></li>
<li><p><strong>URL Shortening</strong>: You can use one of the many link shorteners available today, such as Tinyurl, which would result in a cloaking link like:</p>
<p style="margin:-5px 0; font:11px normal lucida console; color:#F00;">http://tinyurl.com/84vkpm3</p>
<p>Not only does this method not require a 'myproduct' file, but it's the only way I know that you can use a cloaked link in an email, or on another website, such as Twitter. In fact, its original purpose was to shorten links to help meet Twitter's 140 character limit. However, it isn't very pretty or very desciptive of where the link is going. And this method has some security problems, as evidenced by Bit.ly's Warning that comes up whenever you use one of their short links.</p></li>
<li><p><strong>Frame or Iframe Enclosing Redirect Code</strong>: If you enclose your Javascript Redirect code in a frame or iframe on your webpage, then your affiliate link is not EVER shown in the address bar. This is because the destination web page is actually shown on your own web page ( inside the frame ).</p>
<p>However, that advantage is completely wiped out by the big disadvantage of using this method: In order for you to get credit for any sales, your affiliate site must set a cookie on the user's computer. But only third-party cookies can be set from within a frame, and most people's browsers have these turned off by default. So, without you even being aware of it, you will lose most of your commissions!</p></li>
<li><p><strong>Base64 Code</strong>: This code is something that not many people can create themselves. Here is a sample:</p>
<p style="margin:-5px 0; font:11px normal lucida console; color:#F00;">eval(unescape('%77%69%6e%64%6f%77%2e%73 ...</p>
<p>Fortunately, there is an easy-to-use program available to encode the link for us. ( See my sister website, <a href="http://www.scriptsforyourwebsite.com/scriptsforwebsites/scripts/hide-your-affiliate-links/">ScriptsForYourWebsite.com</a>, for more information about this software, how it works, and how to use it. ) You can download this <span style="color:red;">FREE LINK-HIDING PROGRAM</span> by clicking here: <a href="../include/LinkCloaker.exe" target="_blank" rel="nofollow" title="Download Link Cloaker">Link Cloaker</a>. This method, although not as easy to use as others, has the <strong>tremendous advantage</strong> of allowing you to redirect the user to <strong>any page</strong> on the destination website, and still get credit for the sale.</p></li></ol>
<h3>My Recommendation</h3>
<p>To summarize, I can only recommend the last method. It's sole disadvantage it that it is not as easy to use as the other methods. However, that's a small price to pay for completely masking your affiliate information from all prying eyes. And, to emphasize it, it's the only method where you can redirect the user to whatever page you want on the affiliate site.</p>
]]></description>
 </item>

</channel>
</rss>
