2

I want to keep bots from following my external links through rel=nofollow. I have 2 questions about it:

1) Does this really help my page ranking (I heard a SEO guy saying this, as it the page ranking should go up as the probability is lower that the user leaves the page)

2) Does it work when the rel=nofollow is set through javascript in the $(document).ready() function?

EDIT: thanks for the suggestions so far - to go more into detail to 1:

how can the robot know(...)?

The robot knows this because he knows the page ranking of the page that you link to, and if it is high the probability is high that you follow this link and so by leave my page. That's why it is supposed to be good if you have more incoming than outgoing links, where of course incoming links from high-ranked pages count more than incoming links from low-ranked websites. on the other hand outgoing links to high-ranked pages are supposed to increase the probability that the user leaves... but I am no expert in this that's just what this SEO guy was telling

EDIT 2 Question is if it improves my Google pageranking if I put rel="nofollow" to external links, and - in case it improves my page ranking - if this still works through setting it with javascript. Thanks in advance

tmaximini
  • 8,403
  • 6
  • 47
  • 69
  • 1
    Regarding 1: the probability that *an ordinary user* will leave your page is not lowered by adding `rel="nofollow"` attributes; users don't see those, they just see links. – Marcel Korpel May 05 '11 at 12:48
  • @marcel: afaik google calculates this probability through some mysterious equation of incoming and outgoing links – tmaximini May 05 '11 at 12:59
  • 1
    Maybe, but that's something entirely different from what you stated in your question. Even more, “outgoing links to high-ranked pages are supposed to increase the probability that the user leaves” is utter nonsense; if a user wants to click a link, he clicks. You'd better provide links to quality content, so that a user will trust you. – Marcel Korpel May 05 '11 at 13:01
  • Does this answer your question? [Is it useless to add \`nofollow\` using Javascript?](https://stackoverflow.com/questions/9044245/is-it-useless-to-add-nofollow-using-javascript) – Heretic Monkey Aug 08 '22 at 15:14

6 Answers6

1
  1. I doubt
  2. No, it doesn't work. Bots generally don't execute JavaScript code.
stivlo
  • 83,644
  • 31
  • 142
  • 199
1
  1. What?

    the page ranking should go up as the probability is lower that the user leaves the page

    How should a robot know this?

  2. Robots don't process JavaScript, rel="nofollow" has to be present in the source markup as it is sent to the client.

And to add: rel="nofollow" does not guarantee that a link is not followed or added as link to the other page to build up page rank (the real process is much more complex); that depends on the robot/search engine.

Marcel Korpel
  • 21,536
  • 6
  • 60
  • 80
1

1. It's possible. Your pages will flow pagerank internally, so having more outbound links will decrease the pagerank you flow to your own pages.

2. Google is capable of reading javascript, and will honor a nofollow on dynamically created links, however, I am not sure if it works when dynamically adding nofollow on 'static' links.

Of course, there's much speculation when it comes to SEO.

Andre Backlund
  • 6,843
  • 3
  • 20
  • 27
  • Re 1: Perhaps, but `nofollow` is mostly about ranking other people's pages. Moreover, this stuff is highly speculative. At least the OP's remark I quoted is highly debatable. Re 2: I didn't know that, do you have a source (I'm just curious)? Moreover, as I already said, there are more bots/crawlers than Google and those might exhibit an entirely different behaviour. – Marcel Korpel May 05 '11 at 13:11
  • 1
    Heard it from Matt Cutts in one of his GoogleWebmasterHelp videos. His videos are strongly recommended. – Andre Backlund May 05 '11 at 13:20
1

Adding a rel="nofollow" will not stop the bot following the link. but it will stop the bot giving any of your page rank to that link.

Oh and as said before mostly bots do not execute JavaScript. I belive google have been playing around with one that dose, but this is the exception not the norm.

TheAlbear
  • 5,507
  • 8
  • 51
  • 84
0

I came here looking for an answer to this question myself. (Thanks Andre!)

I can attest to Google following links with href="javascript:..." URLs, and going to the correct pages, so that is no defense against unwanted link-crawling. I have also seen search result snippets include text inserted by javascript, so there is ample evidence of Google processing javascript.

If the links are internal, proper use of robots.txt would be the preferred, easier, and more bandwidth-efficient answer, of course, if you have access to that. (We don't on the server in question, thus my own search for answers.)

I shall be adding nofollow via javascript.

John A.
  • 1
  • 1
0

1) The more pages that you link out to, the more it affects your authority ratio, you essentially want more linking in that you link out. CTR is tracked by google analytics and this is factored into their essentially blackbox search ranking magic.

2) Whilst it's commonly thought that robots don't process JavaScript, this is wrong, google's current generation of robots are ajax aware.

martin blank
  • 2,184
  • 3
  • 17
  • 15
  • Regarding 2: but only with specific hashes, using `#!…` style, so I doubt it processes everything on a page. – Marcel Korpel May 05 '11 at 12:45
  • 1
    While a limited subset of crawlers may use JS, most still rely on the trusty old "fetch the page and parse the HTML" technique. There's still a sizable chunk of the Web which doesn't belong to Google; that includes crawlers. – Piskvor left the building May 05 '11 at 12:49
  • @Andre: Huh? AFAIK Yahoo's search engine is still heavily used, too. And the OP asked about robots/crawlers in general, not only about Google. There are *many* crawlers on the web, looking at my statistics I count many that are not Google's. – Marcel Korpel May 05 '11 at 13:03
  • Google has 80%+ percent of the search engine market, optimizing for Google will have the most benefit, even if it harms your listings on other search engines. PS. Yahoo! is some 6% market share. – Andre Backlund May 05 '11 at 13:07
  • @Andre: there are also bots for non-search engine purposes. – Marcel Korpel May 05 '11 at 13:12
  • But the question is about SEO. rel="nofollow" and page ranking would be completely irrelevant if we're not talking about search engine robots. – Andre Backlund May 05 '11 at 13:15
  • Agreed, it's not really worth considering other search engines. Conversion rates on MSN and AOL search engines are significantly higher but all the volume is on Google, so unless your product is something like yachts or islands in the pacific focus on google. – martin blank May 05 '11 at 13:18