Skip to content

Attention Affiliates: Cloak Your Links

Attention Affiliates

It’s no secret: Google isn’t a big fan of affiliate websites.  Look at it from their point of view.  They’re trying to rank the site with the best information.  An affiliate site’s primary purpose is selling a product, so they know you’re going to be saying damn well anything to get people to click on those affiliate links.  Which is likely far off the mark from “quality content.”

Leaving your affiliate links looking how they usually do (i.e.: long and sloppy) is a dead giveaway that you’re an affiliate.  Not only to Google, but to your visitors as well.  If you site is a “unbiased” product review site, you’ll lose credibility when a reader sees that you’re directly making money off the product you reviewed.

So whats the solution?

Cloak those Affiliate Links

Step 1: Create a Sub-folder on your site

This can be easily accomplished by going to your cpanel, opening your file manager, and creating a new folder at the root level of your site.

file manager

This is the directory where we’ll place your links, so name it something relevant.

Some examples:

  • www.site.com/products/
  • www.site.com/recommendations/
  • www.site.com/links/

Step 2: Edit your robots.txt

Add a “Disallow” line for the directly you just made

User-agent: *
Disallow: /wp-admin/
Disallow: /wp-includes/
Disallow: /products/

Note: Some WordPress XML sitemap plugins interfere with the robots.txt by overwriting it.  You don’t want that to happen.

Step 3: Open WordPress and Install the Plugin: Redirection

Redirection can be found here.

Once installed, go to Tools > Redirection

For each of your affiliate links, specify how you would like the links to look in the “Source Url” field.  Specify your gnarly affiliate link in “Target URL“.

redirect plugin

That’s it.

Note: If you’re an Amazon Affiliate, cloak at your own risk.  Amazon is pretty unforgiving about Terms of Service volations and this is definitely a bannable offense.

 

Matt-Author-Img

Article by

Matt Diggity

Matt is the founder of Diggity Marketing, LeadSpring, The Search Initiative, The Affiliate Lab, and the Chiang Mai SEO Conference. He actually does SEO too.

27 thoughts on “Attention Affiliates: Cloak Your Links”

  1. Good idea, and it seems logical, but I’m curious if you’ve tested this and found any positive effects?

    1. Hey Sean. I haven’t done any testing to actually ‘prove’ that there is a benefit. But on the other hand, by using this technique, I’ve never seen any of the negative effects associated with affiliate sites.

  2. Hey matt nice article,, actually i’m doing it with pretty link lite plugin and I didn’t create a folder via my Cpanel and just added my desired url for affiliates in that plugin and done.. but here is a question, I’ve seen some seos aren’t cloaking affiliates links, is there any harm of not doing this? Because I personally think that googlebot still crawls cloaked links but doesn’t index them at all. If Google crawls it then what seo benefit we’ll have by doing this? I know that there is higher chances of users to click on a cloaked link because user doesn’t know that it’s an affiliate link..

    1. I differ in the sense that I strongly believe that Google wan’t crawl all the way to the destination of the redirected link. Crawlers are ‘supposed’ to honor the robots.txt file and a lot of times, its in their best interest to. It saves them a ton of data that they need to crawl and maintain in databases. Are they going to give up this huge benefit, just so they can catch some affiliate marketers? Not likely.

      So what happens if you don’t do this? Hard to say, as I’ve been doing it for ages. But I can indeed say from experience in one of the most lucritive affiliate niches, Google hates affiliates, so trying not to look like one is well worth it.

  3. Hi Matt! I just discovered your blog today and man… I’m so excited I did! This is full with awesome, non conventional (i.e. awesome) knowledge. Thank you very much for sharing it!

    Regarding this specific post… Isn’t using the Pretty Link plugin the same thing?? Or there’s a disadvantage on using it (Pretty Link). Thanks!

    1. Hi Jorge. Prettylink does the renaming (redirection) but it doesn’t handle the blocking of the directory.

    2. Hey, Jorge! I read your Affiliate Spotlight on ‘moreniche’. I recently learned about marketing and have been frustrated with all the scams out there. I loved your passion for the subject. I tried to find you and this is the only place I could find you. Anyways I was wondering if you could be my mentor. Please consider my offer. Thank you so much!

  4. Matt – how can you tell which XML plugin will overwrite the robots.txt file? I have SEO Yoast plugin on most of my money sites. I want to use the directory method you speak of but want to be sure it will be working…

    1. Hi Rob, I don’t use Yoast so I’m not sure. You’re going to have to trial and error and just check the robots file.

  5. While this is manual if you want a piece of javascript that google won’t read as a link here you go:
    < a href="void(0);" title="Insert A Title" rel="nofollow" >

    I use it for navigation on sites where I want the link there but don’t want google to see a link on tons of pages. Wait until the page is updated in google cache and look at the text version and you will see it doesn’t see where you are linking. hope it helps

  6. Hey Matt,

    Just wanted to ask you, what’s the max amount of affiliate links you use on a given page?

  7. Hi Matt,
    Really respect your work and your unfailing attention to detail – masterful!
    My question is using this method but NOT actually creating the subfolder (in my case I am using /go/ ) and doing everything else right – and it still works?
    Does it auto-magically populate the subfolder or something?
    Just wondering why it works when I forgot to create the subfolder for a site but the links still work?
    Bren

    1. Hey Bren, it works because just like anything with URL language, you can specify a path to any file with the intermidary directories existing. Nonetheless, uou want to create the subfolder because you want to be able to block it, and everything in it, from the crawlers.

  8. Regarding step 1: What to put in the root directory? The affiliate links (target urls) or source url? A picture from the subfolder would make this easier to understand.

    1. Nothing actually goes in the directory. Everything needed to implement this is shown in the post. 🙂

  9. Here comes late answer but you mentioned: “This is the directory where we’ll place your links” — therefore my question about what to put in the directory…
    And now you’re telling nothing goes in the directory.

    So giving it a name like http://www.sitename.com/go would be enough, nothing goes in that directory? Only creating an empty folder?

  10. Hi Matt,

    I haven’t cloaked my links on my Amazon affiliate site as its against their TOS.

    My question is: what is the risk of being banned from Amazon Associates for cloaking links?

    Thanks.

Comments are closed.