Is it useless to add `nofollow` using Javascript?

3.5k views Asked by At

AFAIK, the rel="nofollow" attribute on links instruct search engines not to follow through the link when it crawls your site, therefore severing all assumption of relationship between your site and the linked site, and therefore, not sharing any of your SEO goodness. For the most part, that's a Good Thing™ on a comment system.

Now, after integrating an IntenseDebate system on my site, I noticed that the commenter names link through their respective websites without nofollow. This kind of raised an alarm in my head --- that is, until I realized that these were generated dynamically via AJAX. Which means that these links aren't there when a search spider crawls through my site.

Problem averted. Good. A good sigh of relief.

But then, there are these sites that suggest implementing a script-based solution to add nofollow.

Now that just doesn't jive well with my current understanding of nofollow, for two reasons:

  1. As mentioned, the links aren't there when a spider crawls your page. So it doesn't make sense to nofollow it, because as far as the spider is concerned, there isn't anything to follow after all.

  2. Regarding static links, a spider wouldn't be able to run the script to add nofollow on your markup, so links that a spider can follow will be unmodified, and therefore, are follow links.

Am I missing something here? Is it actually useful to dynamically add nofollow to links using Javascript?

1

There are 1 answers

1
Tim M. On BEST ANSWER

From an interview with Matt Cutts from Google (emphasis mine):

For a while, we were scanning within JavaScript, and we were looking for links. Google has gotten smarter about JavaScript and can execute some JavaScript. I wouldn't say that we execute all JavaScript, so there are some conditions in which we don't execute JavaScript. Certainly there are some common, well-known JavaScript things like Google Analytics, which you wouldn't even want to execute because you wouldn't want to try to generate phantom visits from Googlebot into your Google Analytics.

We do have the ability to execute a large fraction of JavaScript when we need or want to. One thing to bear in mind if you are advertising via JavaScript is that you can use NoFollow on JavaScript links

Additional debate on the topic: https://webmasters.stackexchange.com/questions/5653/does-the-google-spider-render-javascript.