Feb 12 2008
Jeremy Schoemaker

Guide to Link Cloaking, Masking, and Url Redirection

By Jeremy Schoemaker 85 comments

Sorry about the redirect earlier LOL... the syntax script was not picking up the meta refresh and it was redirecting... DOH.

I see a lot of posts about Link Cloaking, masking and URL redirection as it relates to affiliate marketing and I think there is a lot of confusion out there. I wanted to make a post briefly defining what each is and how they are used. This is by no means a SEO, PPC or affiliate marketing guide.

Link Cloaking is basically when you show search engine bots one thing and humans another. Its generally regarded as Black Hat SEO to link cloak. The reason people link cloak is because they believe the search engines have fingerprinted affiliate links and if the bots see them it will hurt there organic SEO rankings and if they are doing Pay Per Click marketing that it will hurt there quality score and thus raising there prices per click.

The simplest way to link cloak is by UA (user agent). Search engine bots are *supposed* to identify themselves to your website and you can programatically target them based on this UA string. Advanced link cloakers will target by IP Address. There are lists you can buy off the internet of search engine IP blocks.

Link Masking is making your link look like something its not. The most common reason people mask links is to hide from humans the fact that there link is going to an affiliate offer. The deception actually happens in the status bar of the browser. When you hover over a link it shows in the status bar where the link is going to. You can disguise this to say anything you want. For instance you could disguise a link that is going to a dating affiliate eHarmony offer to look like its going to eharmony.com. This is generally done javascript. Here is some example code of masking a link:

JAVASCRIPT:
  1. <a href="http://www.eharmony.com/?affiliate=shoemoney"  onmouseover=" window.status='http://www.eharmony.com'; return true" onmouseout="window.status=''; return true">eHarmony</a>

URL Redirection is redirecting a url using a web service or a jumpscript. A lot of times in forums I see affiliates talking about URL Redirection calling it cloaking or actually thinking it serves the same purpose as cloaking. Also people like to use it as a form of link masking... although personally I am more leary of links going through easily recognizable URL shortening services like tinyurl. Jump scripts are a little more technical way to do URL Redirection. For bloggers there are Wordpress Plugins like simple link manager ($29.95) that will handle this for you. For those php savy there is simple ways to do this in php... for example you can create an array of urls and keywords for them then call them like http://www.shoemoney.com/link.php?go=azoogleads.

and in link.php we have:

PHP:
  1. <?php
  2. $urls = array (
  3. 'azoogleads' => 'http://c.azjmp.com/az/ch.php?f=1700&i=12&sub=affiliatecode',
  4. 'xy7' => 'http://rapidresponse.directtrack.com/index.html?super_affiliate_code=affilaitecode'
  5. );
  6.           header ('Location: ' . $urls[$_REQUEST['go']]);
  7.       ?>

So now you can specify noindex for this link.php file in our robots.txt and *supposedly* search engines wont see it... Organically I believe they will still see the 301 redirect so if you are doing this for SEO reasons... kind of silly.

Another big reason people use URL Redirection is because they are worried about their affiliate companies stealing their PPC keywords. I will be honest this is a good reason BUT using the above mentioned methods will not shield your keywords if you are doing PPC campaigns and using these redirection scripts to the offers. Whoever is hosting the offer will see all of your keywords. The reason is because they are simple header location redirects and the browsers will carry over the referring URLs which contain all your keyword data (or whatever else refer string data there is).

The only way to block the affiliate company from seeing your keywords and properly protect your direct PPC offers is to use a javascript meta refresh. BUT be careful with this with PPC because the PPC bots will not process the javascript and possibly penalize you for having zero content on your meta refresh jump script page and your PPC prices will soar for not having any matching content.

A simple meta refresh page looks like this in a html file.

HTML:
  1. <meta http-equiv="refresh" content="0;url=http://www.affiliate.com/?affilate=shoemoney">

So which one is best... well really depends... I just hope I helped clear some confusion in terminology. I think all can be effective if applied correctly. Also many things can be killed with one thing... for instance you could write a javascript script that pretty much does cloaking/masking and redirection. Also websites are not supposed to be penalized or passing PageRank through javascript links.

Just test and see what works best for you ;)

  1. FF0000
    Harry said on February 12th, 2008 at 9:04 am

    Your blog is getting redirected to http://www.affiliate.com/?affilate=shoemoney.

  2. FF0000
    Joris Verschoor said on February 12th, 2008 at 9:13 am

    Your article executes some code somewhere, because it redirects to http://www.affiliate.com/?affilate=shoemoney

    cheers

  3. FF0000
    nickycakes said on February 12th, 2008 at 9:14 am

    way to redirect your own page smart guy

  4. FF0000
    Affiliate Confession said on February 12th, 2008 at 9:21 am

    Way to go on the redirect. I wonder how many people will figure out how to stop it. You are more evil than John Chow.

  5. FF0000
    Make Money Online said on February 12th, 2008 at 9:22 am

    maybe get the redirect to open in a new window (p.s. did your site go down this morning?)

  6. FF0000
    Bahamas Hosting said on February 12th, 2008 at 9:24 am

    Hey nice redirect. Kinda like an early April Fools!

  7. FF0000
    SEO Viking said on February 12th, 2008 at 9:26 am

    Oh dear, took me awhile to realise that mr Shoe made a mistake in his post, annoying to keep getting redirected if you dont stop it!

  8. FF0000
    Bablooji said on February 12th, 2008 at 9:28 am

    Interesting article. So what exactly do affiliate sites, like bensbargains.net, do before they send a person to the affiliate website? Do they have some redirection page, or an internal tracker to capture where the traffic is going? Sometimes I see multiple sites in the status bar changing rapidly. Are these multiple redirections?

  9. FF0000
    Dexter | Techathand.net said on February 12th, 2008 at 9:28 am

    URL redirection works best for me. Since I can redirect some post that was marked with Stop words by Adsense . I have made a post regarding redirection the other day.. and here it is [ Redirecting Post for Advertising & Monetizing Purpose ]
    Your reader might be interested.

  10. FF0000
    Beer said on February 12th, 2008 at 9:32 am

    haha, GREAT POST! Wonder how long it will take for him to close that [html] tag in wordpress. I hope Affiliate.com is at least his site or he just made some guy really happy.

  11. FF0000
    Lori said on February 12th, 2008 at 9:46 am

    Since I have a hard time understanding all that technical jargon, I use WP Affiliate Pro. It’s much easier and now that they’ve added the newer features like nofollow and internal link juice, it’s even better.

    Since I’ve been using this and making the links look like they redirect to another page on my site, my conversions have increased.

    P.S. WTH? Everytime I’m about half way through the comment, I get redirected to your affiliate.com page. Kinda aggravating!

  12. FF0000
    Sean said on February 12th, 2008 at 9:54 am

    Give a man a fish…

  13. FF0000
    Blog Advertising Network said on February 12th, 2008 at 9:58 am

    I recommend everybody to use the PHP version

  14. FF0000
    SEOContest2008 said on February 12th, 2008 at 9:59 am

    Yup, its a bit annoying, but I’ll give it a try ;)

  15. FF0000
    xbrain said on February 12th, 2008 at 10:07 am

    i love what you teach in here shoe..great

  16. FF0000
    Sheepeffect.com said on February 12th, 2008 at 10:10 am

    Affiliate links are ugly. Even if people do not know about affiliate marketing they might be scared by these URLs (you know, internet is scam, scam and…)

  17. FF0000
    Start Blogging said on February 12th, 2008 at 10:25 am

    I hide affiliate linka with mysitename.com/recommended/affiliatesite.php

  18. FF0000
    Start Blogging said on February 12th, 2008 at 10:25 am

    Same here. That’s what I use.

  19. FF0000
    Vijay Teach Me $$ said on February 12th, 2008 at 10:33 am

    Link cloaking, redirecting that is the way to go baby….

  20. FF0000
    Tyler Dewitt said on February 12th, 2008 at 11:01 am

    Jeremy,

    Great Post I prefer the .htaccess :) well then again depends on the size of the affiliate site hehe

  21. FF0000
    impNERD said on February 12th, 2008 at 11:20 am

    Great post shoe. I’m sure this will be a nice reference for quite a few people.

  22. FF0000
    MacBook Air said on February 12th, 2008 at 11:27 am

    When I see a link in the status bar that has ‘Recommended’ in the URL, I’m pretty sure it’s an affiliate link. So it’s not really hidden from the initiated folks that might be visiting your site…

    If you’re going to go to the trouble of masking/cloaking links, try not to hint that they might be affiliate links.

    /2c

  23. FF0000
    Blog Advertising Network said on February 12th, 2008 at 11:31 am

    Of course it will be more usefull to have an admin panel to set the redirection URLs.

  24. FF0000
    RacerX said on February 12th, 2008 at 11:32 am

    This really eliminates some confusion for me. Thanks for the guide!

  25. FF0000
    Adam Maywald said on February 12th, 2008 at 11:39 am

    Funny how long some of this stuff has been around. One of my first affiliate sites in 2000 I was doing link masking because I thought it would help the conversions for a Directv site. Good times.

  26. FF0000
    Terra Andersen said on February 12th, 2008 at 11:39 am

    I have been looking for an article like this for a long time. Thanks for sharing!!!

    :)

  27. FF0000
    Simlock verwijderen said on February 12th, 2008 at 11:43 am

    Thanks for tips man, but it is not good for to use.

  28. FF0000
    Blog Advertising Network said on February 12th, 2008 at 12:08 pm

    I think only the recommend directory is showing that. Just rename it to redirect.

  29. FF0000
    Blog Advertising Network said on February 12th, 2008 at 12:09 pm

    Why not? As ShoeMoney says, it’s a affiliate marketing strategy.

  30. FF0000
    Instant Commnunity said on February 12th, 2008 at 12:34 pm

    Very well written tips, this would honestly give alot of readers a clear understanding of the terms and when they are applied.

  31. FF0000
    Profiteer said on February 12th, 2008 at 12:48 pm

    Great nitty-gritty!

  32. FF0000
    Nick said on February 12th, 2008 at 1:17 pm

    Nice post, Jeremy.
    Here’s a link to the jump script that I use on my site. It’s a PHP file with instructions and an introduction.
    -Nick
    http://www.learnhow2earn.com/2007/11/29/my-jump-script-is-your-jump-script/

  33. FF0000
    Will said on February 12th, 2008 at 1:22 pm

    sounds and looks good to me :)

  34. FF0000
    Jeremy Schoemaker said on February 12th, 2008 at 2:12 pm

    sorry I accidentally left the meta embed in the post

  35. FF0000
    Tim said on February 12th, 2008 at 2:53 pm

    Nice post Shoe. Do you ever use a GET keyword method in your link.php file when you’ve assigned a unique URL query parameter to each keyword? I’ve been trying to figure out how to do this without messing up the redirect. ;)

  36. FF0000
    Tim said on February 12th, 2008 at 3:39 pm

    By Jove, I think I got it. Double quotes are fine inside a single-quoted string. So something like sid=echo $_GET["keyword"] ;? would work inside the single-quote array where your URL is. Err, maybe…

  37. FF0000
    Ninja Steve said on February 12th, 2008 at 3:46 pm

    Not such a short post, was that now ;)

  38. FF0000
    Paul said on February 12th, 2008 at 3:57 pm

    What a great post. When search engines and affiliates find out that people are doing this, do they punish?

  39. FF0000
    CJ said on February 12th, 2008 at 4:20 pm

    Would it be bad to use .htaccess to redirect something like “http://www.shoemoney.com/xymedia” to the affiliate link?

  40. FF0000
    CJ said on February 12th, 2008 at 4:23 pm

    Can’t you just mask the affiliate link using an .htaccess file?

  41. FF0000
    Feed Flare said on February 12th, 2008 at 4:33 pm

    Ok so I have a lot to learn, I have no clue what Jeremy was talking about……lol

  42. FF0000
    Brewster said on February 12th, 2008 at 5:09 pm

    or at least an easy way to change the links quickly

  43. FF0000
    Ben said on February 12th, 2008 at 5:14 pm

    affiliate.com got quality traffic !

    well done :)

    btw: nice snippets

  44. FF0000
    John Loch said on February 12th, 2008 at 7:08 pm

    Glad to read it was a local booboo and not a hack or the like.

    I don’t read too many blogs directly (preferring agg Ypipes filters instead) and was surprised to find your blog unavailable.

    I know you reboot regularly, but after about ten mins I started thinking.. oh no - not again :)

  45. FF0000
    Brent said on February 12th, 2008 at 7:25 pm

    This is a decent beginners guide, but there are much better methods than the ones listed here as I’m sure shoe is aware. For one never pass your keywords through the affiliate network. Pass an ID instead so only you know the keyword. - otherwise who knows how many eyeballs get to see your data.

  46. FF0000
    Jason said on February 12th, 2008 at 8:44 pm

    Wow. This was a kickass article. Thanks for just laying it out.

    I plan on using the first piece of code a lot.

  47. FF0000
    Flash Gamer said on February 12th, 2008 at 11:16 pm

    This is very informative and I did not know what link cloaking was. This was helpful, thanks for posting it!

  48. FF0000
    jim said on February 13th, 2008 at 12:00 am

    I like URL redirection through one file because that will give you one place to make changes if something happens to an offer, instead of changing it on all of your pages. For example, an affiliate of mine was having technical issues so I swapped out all the links for six hours and didn’t lose any conversions (saved me quite a bit of money). Plus it’s just easier maintenance.

  49. FF0000
    Jeremy Schoemaker said on February 13th, 2008 at 12:14 am

    yes although that really falls more under redirection.

  50. FF0000
    Jeremy Schoemaker said on February 13th, 2008 at 12:15 am

    from a automated perspective I have not found this the case… although I believe when your site is reviewed by a human if it has too many affiliate links it can be flagged and highly penalized

  51. FF0000
    JT said on February 13th, 2008 at 1:15 am

    “The only way to block the affiliate company from seeing your keywords and properly protect your direct PPC offers is to use a javascript meta refresh. BUT be careful with this with PPC because the PPC bots will not process the javascript and possibly penalize you for having zero content on your meta refresh jump script page and your PPC prices will soar for not having any matching content.”

    if someone can help, that means if you were just redirecting an offer from adwords directly to the affiliate page.

    so would this work?

    1. create a landing page.
    2. links point to a page with the meta-refresh code
    3. that page then points to a cloaked affiliate link page

    that way then your keywords are protected?

  52. FF0000
    Syed Balkhi said on February 13th, 2008 at 5:36 am

    excellent post jeremy.. i like the linkmasking technique as it works sometimes.

  53. FF0000
    Pete Moore said on February 13th, 2008 at 7:34 am

    Hey jeremy,

    Jim is right that is the reason all affiliate marketers should use some form of url redirection its worth adding that your affiliate links are also not always on your own website so should something change as things do all you have to do is amend it.

    Also you may recommend products offline it is alot easier remembering your own url and the redirect than trying to remember a long affiliate url.

    Great post

    Thanks
    Pete Moore

  54. FF0000
    Paul said on February 13th, 2008 at 8:05 am

    It sounds like it’s sleeting, but every time I turn on the outside light & look, nothings happening.

  55. FF0000
    Paul said on February 13th, 2008 at 11:26 am

    I think this was a great post too. But with proper SEO you don’t really need the black hat stuff.

  56. FF0000
    Affiliate Confession said on February 13th, 2008 at 12:19 pm

    It’s great to use, but it’s rediculous you have to because Google hates affiliate links. Do no evil, yea right.

  57. FF0000
    hanji of money-code said on February 13th, 2008 at 12:52 pm

    Nice post. Covered very nicely.

    Thanks!
    hanji

  58. FF0000
    Will said on February 13th, 2008 at 1:06 pm

    yea i believe shoe has another post somewhere on this blog that talks about a similar thing.

  59. FF0000
    Will said on February 13th, 2008 at 1:11 pm

    what I do is just pass a general id, not the specific keyword. tracking is not as great, but doesn’t reveal the keyword.

  60. FF0000
    Will said on February 13th, 2008 at 1:12 pm

    lol. hmm makes you wonder :O

  61. FF0000
    hdtv said on February 13th, 2008 at 2:40 pm

    Thanks for the follow up on the redirect….I was so confused!

  62. FF0000
    Make Money - Cashtacular said on February 13th, 2008 at 3:47 pm

    When redirecting, it’s also helpful to mod_rewrite the URL so that it appears static, as that generally creates more trust for the person clicking the link. Instead of redirect.php?go=affiliate, you can have yoursite.com/moreinfo/affiliate_name

  63. FF0000
    phurbu t namgyal said on February 14th, 2008 at 12:26 pm

    thanks for sharing the link masking tips. was looking up for that.

  64. FF0000
    Patches and Hacks said on February 15th, 2008 at 8:51 am

    I wrote a module for wordpress that will let you do this easily without writing any code. IT can even let you define keywords and then automatically replace the keywords with affiliate links.
    http://patchlog.com/wordpress/hidden-affiliate-links-update-version-02/

  65. FF0000
    Mary said on February 16th, 2008 at 12:29 pm

    I saw the exact same thread here by a different writer

    http://forums.digitalpoint.com/showthread.php?t=702576

    So whose post is this?

  66. FF0000
    jim said on February 16th, 2008 at 2:21 pm

    what a idiot like you would not notice. He even left your ids and stuff

  67. FF0000
    James Binford said on February 16th, 2008 at 3:44 pm

    Jeremy,

    Great post! I agree, using your technique to redirect does work well. I have about 30 or so sites that point to individual products in eBay. Each url is indexed and I have found that my numbers have gone up since going from a generic eBay “rover” link, to a redirected link from my site.

    Your blog is a definate must read and I have already subscribed. Thanks for the info!

  68. FF0000
    Erica DeWolf said on February 17th, 2008 at 1:46 am

    Great definitions of some similar but oh so different technical terms. Thanks!

  69. FF0000
    Utah SEO said on February 17th, 2008 at 3:05 pm

    G’s detection of sneaky JavaScript redirect isn’t full-proof.

  70. FF0000
    Tom M said on February 21st, 2008 at 12:31 am

    Thanks ShoeMoney for the great article, I was wondering how this was done. I see you do not do this on your ads. Is this a preference or do you think it is not smart?

    I do see this method on blogs like John Chows.

    BTW, I found this because some guy is stealing all the posts and reposting them on DP. I guess he was caught because his blog is offline.

    Keep up the great information!

  71. FF0000
    Suresh said on February 21st, 2008 at 2:03 am

    I was faced one of my site by organic ranking fall down and not able to retrieve them again. But Now I think after getting guide by this article may be resolve the problem.

  72. [...] vikassah wrote an interesting post today onHere’s a quick excerptIts generally regarded as Black Hat SEO to link cloak. The reason people link cloak is because they believe the search engines have fingerprinted affiliate links and if the bots see them it will hurt there organic SEO rankings and if … [...]

  73. [...] to Link Cloaking, Masking, and Url Redirection This entry was written by Jeremy Schoemaker. Bookmark the permalink. Follow any comments here with the RSS feed for this post.Content related [...]

  74. [...] This is a bit on the technical side, but if you deal with these issues yourself you have to know these things: Shoemoney just wrote a great post on Link Cloaking, Masking and Redirection. [...]

  75. links for 2008-02-13 said on February 12th, 2008 at 6:52 pm

    [...] Guide to link cloaking, masking and url redirection Jeremy defines the differences between link cloaking, masking and url redirection and provides some handy php and javascript code to illustrate how these can be implemented. (tags: seo affiliate marketing php javascript) [...]

  76. [...] Guide to Link Cloaking, Masking, and Url Redirection, ShoeMoney [...]

  77. [...] While you wait for the first post, here is a great post about linking from good ol’ shoemoney. [...]

  78. Using video sharing to make money » Salestorm.net Blog said on February 13th, 2008 at 5:07 pm

    [...] Nice Guide to Cloaking, Masking and Redirection [...]

  79. How To Hide Your Affiliate Links | VikingBlogger.com said on February 14th, 2008 at 8:52 am

    [...] between cloaking, masking and redirection. Instead of writing it myself, I provide you with a link. Shoes Guide to Link Cloaking, Masking, and Url Redirection » Post Purchase:  Inline [...]

  80. NeverblueAd’s Experiment | Sinporium Blog said on February 14th, 2008 at 11:55 am

    [...] Shoemoney recently wrote a post about cloaking, masking and redirecting your affiliate links so you get more clicks on them from other bloggers.  He runs through what the difference between each of them is for those of us that are still noobs to this. [...]

  81. Best Posts for the Week of February 11th, 2008 said on February 17th, 2008 at 4:18 pm

    [...] with Your Website. Convert Your Clicks. A Twitter / StumbleUpon Combo to Benefit the Blogosphere. Guide to Link Cloaking, Masking, and Url Redirection. Duplicate Content - It May Not be so Bad. Internet Home Based Business Advice. The SEO Sins No [...]

  82. In Anchor » Roundup Thursday for the Week of 2/10/08 said on February 18th, 2008 at 11:11 am

    [...] offers up a great guide to link cloaking, masking, and URL redirection. He does a good job of defining and explaining what each one is. Thanks for the 101, [...]

  83. Webmastern.se din guide till större inkomster på nätet said on February 26th, 2008 at 12:39 am

    [...] Du kan läsa mer om olika redirectstekniker hos Shoemoney.com [...]

  84. This Month In SEO - 2/08 - TheVanBlog said on February 29th, 2008 at 2:30 pm

    [...] Guide to Link Cloaking, Masking, and Url Redirection [...]

  85. Using video sharing to make money | Salestorm.net said on June 21st, 2008 at 11:15 am

    [...] Nice Guide to Cloaking, Masking and Redirection [...]

What do you think? Join the discussion...

How do I change my avatar?

Go to gravatar.com and upload your preferred avatar.