Subscribe to our RSS feed RSS
September 18, 2009

How Do You Hide Affiliate Links From Google?

There are two main reasons why you would want to hide your affiliate links from Google:

  • They “leak” link juice;
  • They say, Google hates affiliate links because they show to Google that the site’s content is “second-hand”

So, we are running into the dilemma here: we want to monetize Google traffic and we don’t want to risk our reputation. Two main strategies to use are (note: to avoid link juice leak, the combination of these strategies can be used):

Example A Disadvantage
rel=”nofollow <a href=”http: //affiliatesite.com/productID&yourtracking/” target=”_blank”>name</a> People are still not sure how Google (as well as other search engines) treats nofollow attribute
Any type of redirection + Disallow directive in Robots.txt <a href=”http: //yoursite.com/visit/nameoftheaffiliate/…”> name</a> + Disallow /visit/ directory in your Robots.txt file Not really user-friendly: people might expect to go to the same-site page (but instead they are re-directed to another domain)

How do you hide your affiliate links? Please share your opinion in the comments!

Feed for this Entry | Trackback Address
Daily SEO Tip on Facebook

32 comments already

  1. ft lauderdale moving companies on 09.18.2009 at 6:44 pm | permalink
  2. This is more or less exactly what I do on one of my sites. I use a WP plugin to redirect the links and nofollow on those links. I hadn’t thought of including it in the robots file too, that’s a good idea.

    [Reply]

  3. jJ on 09.18.2009 at 6:48 pm | permalink
  4. You can also use javascript and not use anchors…. Google won’t follow those “links” because they are not actual links, but the user will be able to click on them and follow the affiliate site.

    [Reply]

    John S. Britsios Reply:

    And what is if the user has JavaScript disabled? For the sake of accessibility you should use a “noscript” tag. And the the link should be static. So I do not consider that as the ultimate solution.

    [Reply]

  5. Fábio Ricotta on 09.18.2009 at 8:51 pm | permalink
  6. If I can choose I mix 4 ways:
    - Create affiliate link with javascript
    - This link must be nofollowed
    - This link should be redirected (using a directory as base)
    - I block the /red directory with robots.txt

    [Reply]

    John S. Britsios Reply:

    If you use javascript for the link with nofollow, why do you need the last two options? More code? Or more work?

    [Reply]

  7. John S. Britsios (aka Webnauts) on 09.18.2009 at 9:23 pm | permalink
  8. What about the solution I posted at WPW? http://www.webproworld.com/search-engine-optimization-forum/78553-new-canonical-tag-big-3-a-4.html#post440204

    [Reply]

    Ann Smarty Reply:

    Thanks, John, for linking to that awesome discussion.

    [Reply]

  9. Shiju Alex on 09.19.2009 at 7:29 am | permalink
  10. Now Google does craw Javascript.

    Here is a useful video from Matt Cutts of Google, on how to handle paid links in javascript.

    I guess Fabio has covered it all.

    [Reply]

    John S. Britsios Reply:

    You came too late buddy, or you did not read my previous comment. ;)

    [Reply]

  11. John S. Britsios (aka Webnauts) on 09.20.2009 at 12:26 am | permalink
  12. Ann, I am glad you did not mention using JavaScript. And here I explain why: http://www.webproworld.com/google-discussion-forum/91252-breaking-news-google-can-crawl-paid-links-implemented-using-javascript.html

    [Reply]

  13. WiseImpact on 09.20.2009 at 6:14 am | permalink
  14. I prefer the combination of JavaScript and Doorway internal page per vendor. Of course I also disallow the Doorway page in robots.txt and it works great…

    [Reply]

    John S. Britsios Reply:

    That does not work so fine as you are claiming. Linking to a page which is disallowed via robots.txt you are creating a dead end, otherwise called dangling node pages. That means you are not passing PR to the sites you link to, but your page is leaking PR.

    Still there is a solution for that.

    [Reply]

  15. Steve on 09.20.2009 at 8:58 am | permalink
  16. With dynamic links I use a php page that is disallowed in the robots text file. when a customer clicks the link it sets up the link by pulling the data from the database and is then redirected using a meta refresh after telling the customer that they are about to be redirected to the vendors website

    [Reply]

    John S. Britsios Reply:

    Two questions Steve:

    1. When visit the PHP file, does that page have visible content?
    2. What is if a user has disabled meta refresh in his browser? I do that for example.

    [Reply]

  17. Moni on 09.20.2009 at 4:08 pm | permalink
  18. Which one you prefer best, Ann ?

    [Reply]

    Ann Smarty Reply:

    I mainly use redirection + Disallow Robot.txt directive

    [Reply]

    John S. Britsios Reply:

    Ann can you be more specific how do you do that?

    [Reply]

  19. SeoNext on 09.21.2009 at 9:02 am | permalink
  20. You should know that Hiding your affiliate links increase the CTR(click through) because people will not see a long link making no sense.Nice informative post.Thanks a lot for sharing this post with us.

    [Reply]

  21. french bed on 09.22.2009 at 11:18 am | permalink
  22. And what is if the user has JavaScript disabled? For the sake of accessibility you should use a “noscript” tag thanks.

    [Reply]

    John S. Britsios (aka Webnauts) Reply:

    If you use “noscript”, then Google will see the link and follow it. So is that the solution? I assume not.
    Thanks too.

    [Reply]

  23. John S. Britsios (aka Webnauts) on 09.22.2009 at 4:13 pm | permalink
  24. If you are hosting on an Apache server and you do not want google to index and don’t follow the scripts and the links in them, and you have permissions to edit your .htaccess file, you might simply need to add the following lines there:


    Header append X-Robots-Tag "noindex,nofollow,noarchive,nosnippet"

    How about that?

    [Reply]

  25. John S. Britsios (aka Webnauts) on 09.22.2009 at 4:15 pm | permalink
  26. Sorry but the code did not display in full as I have posted it. See here what I am about: http://www.webproworld.com/google-discussion-forum/91252-breaking-news-google-can-crawl-paid-links-implemented-using-javascript.html#post466614

    [Reply]

  27. Golf trip on 09.23.2009 at 11:06 am | permalink
  28. O Great! The simplest way to hide affiliate links from Goggle is to make them no follow. Thanks for the tips.

    [Reply]

  29. Dataflurry on 09.23.2009 at 4:56 pm | permalink
  30. Good run down, I think Google has been more prone to giving away page rank recently, so you have to be careful how often you link out and to whom.

    [Reply]

  31. Minimink on 09.25.2009 at 10:16 am | permalink
  32. That does not work so fine as you are claiming. Linking to a page which is disallowed via robots.

    [Reply]

  33. Incontri on 09.27.2009 at 10:18 am | permalink
  34. I mainly use redirection + Disallow Robot.txt directive.
    For some types of creatives I also use iframes.

    [Reply]

  35. Vinicius B P on 09.30.2009 at 7:51 pm | permalink
  36. I usually create js file that contains a function that link to some specified link (Ex.: onclick=”myfunction(’myurl’);”).

    To avoid Google from following the javascript links, I make the function request two parameters, spliting up the URL (Ex.: onclick=”myfunction(’myurlpart1′, ‘myurlpart2′);”).

    Then, I disallow the js file in robots.txt.

    (
    Ex.: I want to link http://www.google.com:
    myfunction(’gle.com’,'www.goo’);
    myfunction should make it work.
    )

    *Of course, users with javascript disabled will not see anything happens, but taking into account analytics reports, that says that only 3% of users has no javascript support, I woudn’t care that much.

    [Reply]

    John S. Britsios (aka Webnauts) Reply:

    But I do care about the 3% as that is equal to approx. 330 unique visitors per month in a low trafficed month.

    [Reply]

    Vinicius B P Reply:

    Another thing that I have already done is exactly one of Ann’s suggestions: Any type of redirection + disallow directive in Robots.txt.

    To make it a little bit more user friendly, the page responsible for redirecting does not redirect to anywhere, but warns users that they will be redirect to another domain and they can choose between being redirected or going back to where they were.

    (
    Actually, I combined this technique with javascript. Users with javascript enabled would see an float element asking if they want to be redirected. Users with no js enabled would see the page.
    )

    [Reply]

  37. Working at home Jerome on 10.12.2009 at 5:50 am | permalink
  38. For wordpress sites I use the GoCodes plugin, mainly to obscure the link from the user’s status bar. As a bonus it logs the click count.

    It displays the path form

    siteRoot/GoFlag/pruductName/

    The author definable GoFlag term causes the redirect to GoCodes wher the real address is found through the pruductName index.

    [Reply]

  39. Modele Case on 10.19.2009 at 10:09 am | permalink
  40. It’s a good idea to redirect and not show the affiliate link to google. also do not use text from the main site, or if you do, show just 100-150 chars.

    [Reply]

  41. 125cc Motorbikes on 10.21.2009 at 3:41 pm | permalink
  42. I’m a fan of the server-side redirect method when possible.

    [Reply]

Leave a Comment

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Bad Behavior has blocked 2349 access attempts in the last 7 days.