1

I am using this (for example)

$('.changeserver').click(function(e)
{
    e.preventDefault();

    quin = $(this).attr('href');

    $('div.caja').css('visibility', 'hidden');
    $('#'+quin).css('visibility', 'visible');

    $('.jdownloader').css('visibility', 'hidden');
    $('#j'+quin).css('visibility', 'visible');


    $('#servers li a').css('color', '#666');
    $(this).css('color', '#bababa');

});

The url where the users click is www.domain.com/putlocker, as there is the e.preventDefault(); the users doesn't get an error, however, when Google crawls the site, it counts all those likes as 404 links because he doesn't care about the e.preventDefault() as he just reads the code.

How can I fix that?

Aleix
  • 489
  • 5
  • 16

3 Answers3

4

To prevent Googlebot from following an individual link, add the rel="nofollow" attribute to the link itself.

http://support.google.com/webmasters/bin/answer.py?hl=en&answer=182072

Change your link to:

<a href="www.domain.com/putlocker" class="changeserver" rel="nofollow">Change server</a>
Rory McCrossan
  • 331,213
  • 40
  • 305
  • 339
  • No problem. If this answer helped you, could you mark it as accepted by clicking the green tick to the left - and also some of your previous questions too! – Rory McCrossan May 01 '12 at 13:51
3

You could trying using the rel=nofollow attribute

http://en.wikipedia.org/wiki/Nofollow

But this leaves a problem with your site. What if the user has javascript disabled? Then they will click on the link and get a 404. Perhaps consider putting the URL in a data attribute like

<a data-url="/example.html" href="#">My Link</a>

Then replace this line

quin = $(this).attr('href');

with

quin = $(this).data('url');
CambridgeMike
  • 4,562
  • 1
  • 28
  • 37
  • There's a lot of javascript in my page which is needed to access lots of functions, so they better get javascript working! Thanks for the tip though – Aleix May 01 '12 at 13:51
1

make the url more like '#putlocker' and adjust your parsing accordingly.

Andiih
  • 12,285
  • 10
  • 57
  • 88