Need a Fresh Start for Your Internet Business? Grab My FREE Report!

VIDEO: Link Cloaking 101: What, Why and How

Keller Hawthorne | January 26, 2010 | 52 Comments
Videos
VIDEO: Link Cloaking 101: What, Why and How

This video is long overdue, so I’m really excited I finally got a chance to work on it. I have to admit, I felt a little rusty putting it together due to my recent hiatus, but I had fun!

In just under 20 minutes, I walk you through the what, why and how of cloaking affiliate links.

Basic Outline

1. What Is a Cloaked Link?

  • How it looks compared to a normal affiliate link.
  • Diagram of how it works.

2. Why Cloak Your Links?

  • Protection
  • Credibility
  • One Step Editing

3. What You Will Need to Follow Along With Me

  • Notepad/Plain Text Editor
  • Filezilla/FTP Client
  • Original Affiliate Links
  • The code at the bottom of this post.

4. How to Cloak Your Affiliate Links

Step by step walkthrough.

The PHP Code

<?PHP

Header("Location: YOURAFFILIATELINK");
Exit;

?>

The Video

Watch on YouTube

Watch on Vimeo

WP Greet Box icon
Never miss a post - Subscribe To My RSS Feed and receive updates on new posts related to growing your Internet business!

Topic Tags:

, , ,

  • raymondchua

    Thanks for the tip. I get more sales since I cloak my links. :)

  • http://linkmoney.org/ Link Money

    Keller,

    Great post, great video, so easy to understand.

    Programming does not come easy to me and your step-by-step instructions make it all so clear. This stuff is easy! LOL

    Hey, I'm thinking there might be another advantage and just want to know if my thinking is right or not. For instance Google does not like to see a site loaded with affiliate links, or so I'm told, as posts without a lot of crappy sales links supposedly rank better in the trust algorithm.

    So by cloaking will this just look like an internal link to your own site, or will the spiders be able to recognize it as an affiliate link?

    Thanks much.
    Rich Hill

  • http://www.fresheventure.com Keller Hawthorne

    Thanks Rich!

    Well, there are still links leading from your site to affiliate sites. HOWEVER, all of your blog pages are technically now linking to a page on your own site – that redirect page is what links to the affiliate site. So, that may in fact help.

    It's a very good question. I'm going to look into it further and get back to you :).

  • http://linkmoney.org/ Link Money

    OK, great. I'll be watching for your answer.
    Good stuff on this Blog Keller. I subscribed to your RSS, Stumbled, Dugg and tweeted this post.

    All the best.

  • http://www.massoutsource.com/report/ Tyrone Shum

    Hi Keller,

    Excellent post and it's a great reminder for bloggers to use link cloaking. It definitely helps clients copy and paste shorter links and protects you as well.

    I have use this method many times to just put into ebooks and implementation is so easy as well.

    Keep up the great work with your videos!

  • http://www.darkmansdarkroom.com Darkmans Darkroom

    This makes more sense regarding the number of links leading away from your site, I think, but is in effect a better way of hiding hijack-able links and help keep commissions coming in.
    Thanks for the post Keller.

  • http://twitter.com/miraclady Corinne Edwards

    Wish I knew enough about this to make an intelligent comment. Guess I will wait for the new videos. But I am interested.

  • http://blogtechguy.com/ Joel Williams

    Hi Keller, great video and well explained. Annoyingly it's slightly better than the method I use, though very similar! I was wondering if you think this method is any better or worse than using Max Ninja Affiliate or Pretty Link Pro (though those are WordPress only I think)?

  • http://www.webuildyourblog.com/ Andrew @ WeBuildYourBlog.com

    Rather than coding I use tools like Max Ninja Affiliate for my own blogs. But Max Ninja Affiliate can also be used to automatically create internal backlinks not just for affiliate products.

    For emails and autoresponders I use another tool called Affiliate Link Cloaker.

    I do think it is worth the time and investment to 'cloak' your links as they look much more professional and, I believe, Google doesn't see them as affiliate links.

    Great video.

    Andrew

  • inservo

    Hi Keller,

    great teaching about link cloaking. Although I do not use it yet, it is something that came back to my mind through your very enjoyable video. I will keep this in mind for future purposes just to make sure, that I will not use any commission as soon as I start affiliate linking on my website.

    Just as a sidenote: In WIndows XP when you save the file, you have to set the file type to “all files” otherwise the file gets saved as index.php.txt.

    Tweeted your post as it really is very valuable information.

  • http://robbsutton.com/ Robb Sutton

    I use MBP's Ninja Affiliate to do all of that heavy lifting for me. It actually works out great because I can use those same links to automatically link through to other articles in my blog as well. Also comes in handy when I am making ebooks and other promotional materials.

    Link cloaking is really the only way to go. I do not know why some bloggers still insists on leaving messy affiliate urls all over the place. It's messy and you run the risk of getting ripped off.

  • http://zemalf.com/ Antti Kokkonen

    I cloak links mainly for for one-stop editing, secondly for the looks. If an affiliate links are changes (it happens), I can easily edit the links without going to individual posts. And I can also use non-product spesific links in the links and change the target page if I want (Pretty Links even has default functionality to add multiple URLs into one cloaked link).

    I liked the video, good explanation why to cloak links, etc. But I wouldn't do the actual cloaking the hard way (using the code, index.php, FTP, etc.) when it can be done so much easier with plugins and addons (clickthrough and conversion tracking!). If I wouldn't like to use plugin/addon, I'd probably go for .htaccess and 301 redirect instead of PHP solution.

    Links can be easily cloaked with plugins like Redirection or Pretty Links (both free, although Pretty Links has paid version too). Free plugins even track the number of clicks you get for you, no need to buy those paid versions, they just add automation for USING the cloaked links. And I assume similar addons are available for other blogging platforms as well.

  • http://zemalf.com/ Antti Kokkonen

    Pretty Link has free version too (I use it). And Redirection -plugin can be used as well. PHP solution works for any platform using PHP, but I assume there must be addons/extensions for Joomla and Drupal that does the same.

    Getting all affiliate links into one place and get link tracking is too much pass imho (even with the free versions)

  • http://www.facebook.com/michelle.vandepas Michelle Vandepas

    Keller I've played with link cloaking a bit in the past when I do affiliate links – I love this method. Thanks!

  • http://www.eatsmartagesmart.com/ Eat Smart Age Smart

    Keller,

    This is great. I was not very familiar with cloacking (other than the way Clickbank) does it. This is really a great lesson!

    Looking forward to lesson 2 & 3!

    Krizia

  • http://profiles.yahoo.com/u/TF2KNMIZHH7PNQ2UVLIRNCHV6A thatgirlisfunny

    I wasn't really clear about what cloaking links meant. Now I understand that you're showing us how to make “pretty links”. By that I mean you're demonstrating how to translate a technical expression into a verbal expression so that I can know and trust where I'm going. I'm much more likely to follow a link that says “Recommended by”. Thanks for breaking it down so that even I can understand it.

  • http://energyboomer.com/ Birney Summers

    I have learned a lot that I should be using from this post. Love the video, it is presented at a perfect pace for learning and taking notes.

  • david365

    I currently use a plugin for cloaking links, but have become concerned as to what happens if the plugin stops working after an upgrade (as some plugins do) or the developer stops working on it. This seems an an option where at least you retain control of what is a very important component of your blog. Thanks

  • http://www.fresheventure.com Keller Hawthorne

    Good to see you Joel!

    To be honest, the WP link cloaking plugins scare me as I'm concerned about the answer to this one question – what happens to your links if you decide to stop using the plugin? Did you ever insert the links into the posts, or did the plugin simply look for a keyword term you identified and turn it into a link? If so, then you might be stuck with the plugin forever – your links aren't hard-coded into each post. Is that how they work? If not, they sound they a nice and easy alternative!

  • http://www.fresheventure.com Keller Hawthorne

    Oh, thanks for the heads up on Windows XP!

  • http://www.fresheventure.com Keller Hawthorne

    That's my same exact concern and why I've never used a plugin. I don't know the answer, so I do it manually.

  • http://blogtechguy.com/ Joel Williams

    Excellent point Keller, one that I've thought about for other plugins and themes (ones that have built-in SEO for example) but not for links. Perhaps subconsciously I did wonder about this… Changing my Thesis affiliate link took 1 minute thanks to the system like yours so it is definitely worthwhile.

  • http://www.fresheventure.com Keller Hawthorne

    All of your responses prompted me to add a poll to my sidebar titled “How Do You Cloak Your Affiliate Links?” I would love for everyone to vote – I'm eager to see which method (or lack thereof) wins out!

  • http://linkmoney.org/ Link Money

    Keller,

    One plugin I have not seen discussed is wp125 and I use that on many of my niche blogs to cloak links with.

  • http://www.blogengage.com/story.php?id=44981 Vote on this article at blogengage.com

    VIDEO: Link Cloaking 101: What, Why and How…

    In just under 20 minutes, I walk you through the what, why and how of cloaking your affiliate links….

  • http://zemalf.com/ Antti Kokkonen

    Hmm hmm, I never thought about it like that. Although I can always export the settings (manually if nothing else) and form 301 redirects or php solution what Keller presented instead. It's not like the data can suddenly be lost (all plugin data is saved in WP database, retrievable via backup)

  • lisa82367

    Keller — Wow, what a great video! Well done and easy to understand. To be honest, I had never head of link cloaking. I have few if any technical skills and step by step instructions like yours are so helpful. I will be visiting your blog often as it is full of great information.

  • jimfmunro

    Good video. Good reasons to use.

    I think cloaking has a bad rap as a black hat SEO technique, but it's useful.

    I have put out a few links from a popular affiliate program that just changed providers. Changing the aff link in one place saved a lot of headaches. So I would definitely cloak every link I put out, aff or not. Just makes sense.

    Plus you can track the analytics if you direct people through your site. Nice to know how many clicks it gets without having to rely on other shortening services.

  • david365

    That's worth knowing – the big advantage of a plug-in, apart from convenience, is they record the number of clicks (at least my one does) so you can measure response.

  • jan_queenofkaos

    It is tempting to not bother to take the time to cloak an affiliate link but there are lots of good reasons to take the time. You've been very clear Keller with your explanations – I've been guilty many times of not cloaking but I'm going to cloak mine from now on!

    Anything worth doing is worth doing right, especially down the road when you need to change them or lose your commissions!

    Can't wait to see the rest of the series.

  • http://www.sriraj.org/ Sriraj

    So this is the video that made you put your previous post to draft for a moment. Nice one this.

    I tried this before. The links looks nice this way but the only prob is that it takes little more time for the php code to be executed. Any way, this is a lot better than using any plugin ('Go codes' for example).
    You have all your affiliate links in the 'recommends' directory. But when some one actually cuts your URL to see all the affiliate links you have under recommends directory, it leads to a 404. So, you can also redirect that (http://www.website.com/recommends/) to your home page for suppose, which looks nice (makes sense?)

  • http://ruralramblings.com/ Tish King

    Interesting post. You obviously took a lot of time with this, and it's very educational. Thanks for the good explanations.

  • http://www.thenewbusinessblog.com/ Brian

    What do you recommend for Twitter? I like to promote Clickbank and Amazon offers, and don't want to take the time to upload redirect stuff to my sites. Any thoughts?

  • http://www.oddlyappropriate.com/?p=53 Potty Putter

    Does cloaking your affiliate links really have that much of an affect on your SERPs?

  • primaryworkathome

    Great inputs. I love reading this one. I learn a lot.

  • primaryworkathome

    Great inputs. I love reading this one. I learn a lot.

  • http://ijstyles.com ijstyles

    Nice guide, nice video = awesome. Thanks.

  • http://www.filination.com/blog Fili

    I like the thoroughness of the video, but I'm event more extreme than Antti.

    .HTACCESS with 301 seems like the easiest option by far, one that can be applied to a few blogs together (if you're using WPMU) and maintained/edited faster than with a plugin or this type of PHP solution. Looking at the video I could help thinking – “wow, all that for cloaking?! :O why?”.

  • http://www.fresheventure.com Keller Hawthorne

    Humm… looks like I will need to look further into this 301 method. The PHP redirection has just worked well for me and it's really not that hard to set up, but I'm always interested in making my life easier. Thanks for the feedback Fili!

  • http://wiserwoman.com/ Ruby

    Hi Keller, I'm not sure if you've ever heard of http://mixergy.com but I just shared the link to your link cloaking video over at Mixergy's community forum http://foundersmix.com
    I think you are doing a great job and thought I would spread the word about you.

    God bless!

  • http://www.fresheventure.com Keller Hawthorne

    Thank you so much Ruby! I haven't heard of that site before, but I will definitely go check it out.

  • http://wiserwoman.com/ Ruby

    You are welcome!

  • http://www.win-with-1.com/ Alison Moore Smith

    What a well laid out post, Keller.

    I used to do my redirects with htaccess/301, but for the past year or so I've been using Pretty Link. I love, love, love it.

    I started with the free version but actually bought the pro when I was merging two blogs into one. The pro version converted all the internal links, including all the cloaked links, to my new site.

    If you'll allow a link, I wrote about Pretty Link Pro in early February. Huge timesaver for me.

    As Antti said, if it ever becomes a compatibility problem, I can just export the info.

    One other reason I like it is that many of my clients are brand new bloggers. Coding is out of their comfort zones, but they can easily master a plugin!

  • http://www.fresheventure.com Keller Hawthorne

    Thanks for the heads up Alison! I've never heard of Pretty Links before. Will definitely check them out.

  • Carl

    Dear Keller:

    Your video is excellent, but I can not get my link to cloak properly.

    I have a Website that has several affiliate links that I would like to cloak. More specifically, when a user clicks on one of the links,
    I would like the Web Browser to reveal a URL that does not have “affiliate” in the name. My Website is http://www.website-kept-private.com, which is
    a fictitious Website (I have kept the true name of the Website private to keep in accordance with the terms of this forum). I wish to use PHP coding
    to employ a link (not an entire page or Website) redirect.

    This is a great opportunity, so forth and so on

    Obviously, I created two sub-directories in the Website:

    The 1st is “recommends”, and the 2nd is “software-mobile”. The file “index.php” is placed under the “software-mobile” sub-directory.

    The entire coding for “index.php” is:

    <?php
    header(“Location: http://Affiliatexyz123.Product-To-Sell.hop.clic
    exit;
    ?>

    Of course, Affiliatexyz123 is a fictitious Affiliate I.D.
    Of course, Product-To-Sell is a fictitious product.

    This shows up on the bottom when you mouse over either the link or the picture:

    http://www.website-kept-private.com/recommends/

    Unfortunately, this shows up in the URL address when you click on the link or the icon:

    http://Product-To-Sell.com/?hop=Affiliatexyz123

    This is a link associated with ClickBank.

    The goal is that when the user clicks on the link, that “http://www.website-kept-private.com/recommends/software-mobile”
    shows up in the URL address, instead of revealing the Affiliate I.D. (which is Affiliatexyz123).

    Unfortunately, it doesn't.

    I have Linux hosting through GoDaddy. It seems as though GoDaddy only supports entire page redirects or entire Website redirects.
    Maybe I'm wrong. If GoDaddy does not support single link redirects, who does?

    Also, I sell more than one product on each page, so doing an entire page redirect or entire Website redirect is not desirable.

    I would appreciate the help.

  • Carl

    Hello Keller!

    Your video is great but I still can not get the cloaking to work properly.

    I have a Website that has several affiliate links that I would like to cloak. More specifically, when a user clicks on one of the links,
    I would like the Web Browser to reveal a URL that does not have “affiliate” in the name. My Website is http://www.website-kept-private.com, which is
    a fictitious Website (I have kept the true name of the Website private to keep in accordance with the terms of this forum). I wish to use PHP coding
    to employ a link (not an entire page or Website) redirect.

    One of the lines of coding on my site is:

    This is a great opportunity, so forth and so on

    Obviously, I created two sub-directories in the Website:

    The 1st is “recommends”, and the 2nd is “software-mobile”. The file “index.php” is placed under the “software-mobile” sub-directory.

    The entire coding for “index.php” is:

    <?php
    header(“Location: http://Affiliatexyz123.Product-To-Sell.hop.clic
    exit;
    ?>

    Of course, Affiliatexyz123 is a fictitious Affiliate I.D.
    Of course, Product-To-Sell is a fictitious product.

    This shows up on the bottom when you mouse over either the link or the picture:

    http://www.website-kept-private.com/recommends/

    Unfortunately, this shows up in the URL address when you click on the link or the icon:

    http://Product-To-Sell.com/?hop=Affiliatexyz123

    This is a link associated with ClickBank.

    The goal is that when the user clicks on the link, that “http://www.website-kept-private.com/recommends/software-mobile”
    shows up in the URL address, instead of revealing the Affiliate I.D. (which is Affiliatexyz123).

    Unfortunately, it doesn't.

    I have Linux hosting through GoDaddy. It seems as though GoDaddy only supports entire page redirects or entire Website redirects.
    Maybe I'm wrong. If GoDaddy does not support single link redirects, who does?

    Also, I sell more than one product on each page, so doing an entire page redirect or entire Website redirect is not desirable.

    I would appreciate the help.

  • Carl

    The following line of coding did not show up as I noticed in the previous post:

    This is a great opportunity, so forth and so on

  • http://www.fresheventure.com Keller Hawthorne

    Hi Carl.

    First, make sure you link to the folder, not the index.php. So, your link should look like this:
    http://www.website-kept-private.com/recommends/… (Leave off the index.php).

    Second, I think what you're talking about is a whole other type of redirection where you display a different url in the browser address bar than the page you are actually sitting on. For example, I'm on http://www.amazon.com, but my browser's address bar tells me I'm at http://www.123website.com. Is that what you're asking about? If so, you will need to look up how to do that as I don't utilize that form of cloaking.

    I'm not sure why your affiliate id is being displayed. I use ClickBank and none of my affiliate link ids display in the browser, even after someone is redirected to the affiliate's site. As long as you set up your folders/files correctly and link to the folder, this form of cloaking should help to make your links look nice.

  • http://www.redtechmedia.com Jon

    Thanks Hawthorne! That was easy and now my affiliate links look PRO! You're awesome! Nice WordPress FreshJournal theme too!

  • http://www.internetmarketingrocket.com Mark

    This video was awesome Keller,

    I now know how to cloak links manually via index.php

    Time to check out prettylinks and check out this other cool site with free link cloaking plugins for wordpress http://www.freeaffiliatelinkcloaking.com/

    Thanks again for your thorough, easy-to-follow video

    Mark

  • http://www.fresheventure.com Keller Hawthorne

    Thanks Jon!

  • http://www.fresheventure.com Keller Hawthorne

    Thanks Jon!

Copyright © 2011 · FresheVenture.com · All Rights Reserved · StudioPress Lifestyle Theme Customized by KBH Web Marketing · Terms of Service · Privacy Policy · Site Map