Google PlusFacebook iconTwitter icon+44 113 260 4010 contact@branded3.com

JavaScript Links Now Passing PageRank & Anchor Text

Last week Google made a few announcements at the Google I/O conference and one major one seems to have gone unnoticed.

A lot of people have suspected that Google is crawling JavaScript for some time but due to the random nature of it nobody has done extensive testing to prove either way. Testing this sort of thing is a waste of time because Google has different crawling rules for different sites and whatever is true today probably won’t be true tomorrow.

The changes were revealed by Vanessa Fox and are based around the way Google handles non-standard web links.

Googlebot is now able to construct much of the page and can access the onClick event contained in most tags. For now, if the onClick event calls a function that then constructs the URL, Googlebot can only interpret it if the function is part of the page (rather than in an external script).

Some examples of code that Googlebot can now execute include:

  • <div onclick="document.location.href='http://foo.com/'">
  • <tr onclick="myfunction('index.html')"><a href="#" onclick="myfunction()">new page</a>
  • <a href="javascript:void(0)" onclick="window.open('welcome.html')">open new window</a>

These links pass both anchor text and PageRank.

This is welcome news from Google, even if it changes things a bit. With an algorithm built on links there is no reason Google should count some links and discount others just because of the way they are implemented. From a users point of view if you can click on a link then it’s a real link and that’s how Google should see them too.

This change does bring about some interesting issues and I wonder how many sites will suddenly see thousands of new pages being indexed or a massive boost in rankings as links that previously didn’t count are suddenly used by Google.

Google would be wise to make a big announcement regarding this change otherwise webmasters could be tricked into violating Googles link selling guidelines by offering JavaScript links which actually pass PageRank.

BY Patrick Altoft AT 8:03am ON Tuesday, 2 June 2009

Patrick Altoft is Director of Search at Branded3 and has worked in the SEO industry for over 10 years. With experience across some of the worlds largest brands as well as startup businesses Patrick is well known in the industry and speaks regularly at the major SEO conferences and events. Follow Patrick on Twitter or Google+

Comments

  • http://twitter.com/Danger_Mouse DangerMouse

    Interesting stuff although I’m not persuaded that they’ll be able to do this consistently. This will probably only serve to muddy the quagmire of “which links pass value” even further.

  • http://blog.seochat.sk tybi

    “there is no reason Google should count some links and discount others just because of the way they are implemented. From a users point of view if you can click on a link then it’s a real link and that’s how Google should see them too.”

    Well, that might be not true, if the user has Javascript turned off in the browser. Therefore, I would expect Javascript links carrying less value than the regular HTML links.

  • http://www.pluginid.com Glen Allsopp

    I’m glad you mentioned the last part, I think some site owners are going to see a massive boost because of this, as long as Google can see the links. I know a few sites that have a lot of javascript links back to them due to widgets and so on, so I’ll keep track :)

    Cheers,
    Glen

  • http://jquery-howto.blogspot.com jQuery Tutorials

    I wonder if Google bot can parse jquery code as well or complex javascript objects with functions insight ?!

    I guess since most of the time jquery.js is in external javascript file links generated by jquery or similar javascript frameworks will not be seen by Google Bot :(

    That’s a shame… but probably google will improve its js support…

  • Pingback: SEO - Google agora segue links JavaScript » Pinceladas da Web - XHTML, CSS, JavaScript e WebStandards

  • http://www.innup.de Phillip

    Hi,

    I am wondering whether the much easier to follow links like
    http://www.source_of_the_link_domain.com/linkout.php?target=www.target_domain.com
    will pass any juice to the target-domain.

    Any ideas?
    Phillip

  • http://www.blogstorm.co.uk Patrick Altoft

    If it’s a 301 redirect and the linkout.php script isn’t blocked in robots.txt then yes it will *probably* pass PR – Google is likely to have different rules for different sites though.

  • Pingback: Proof and implications of javascript passing anchor text and page rank » malcolm coles

  • http://www.malcolmcoles.co.uk malcolm coles

    I was all set to publish this two weeks ago but then my host company vanished, my site disappeared from google and then I went on holiday. Anyway, I’ve been tracking how Google handles some links hidden by javascript: http://www.malcolmcoles.co.uk/blog/javascript-anchor-text-page-rank/

    The upshot is that with JS-hidden links from two domains to one page, and plain HTML links from one domain to an identical page on a different URL, the former is the one that google is showing in its results. Even though all links to the first page are hidden by JS, it is the one that google is returning.

    I’m assuming that, because the pages are identical, google is ignoring one as duplicate content. And because the one with only JS-hidden links has them from two domains, it’s treating that as the ‘real’ page.

  • http://www.rahulpandey.in Rahul Pandey

    Certainly a good news for designers/developers.. Google is now making their life hassal free :)

  • Ravinder Malik

    Hi,

    Thanks for nice information.

  • Pingback: Footprints (04.06.09) | Chris Deary

  • http://www.workoutbox.com SimonTurner

    This is a MASSIVE change! I can certainly confirm this is happening by looking at the new Google Webmaster’s Tools. On my site all pages which are linked to from my JS menu now show up as being linked to from pretty much every page. This is new to me and since I’ve implemented a lot of pagerank sculpting on the site, i will certainly be making internal structural changes to stop this happening..

  • http://clearlybeerpong.com Cody Nelson

    woah! thought I had heard about this. good post!

  • http://www.indiawebmediapro.com Aliester

    Doing some dynamic links, and wanted to know if Googlebot can pick up on Javascript functions that are initiated by onMouseOver or onLoad or onBrowserEvent? What I am looking to do is make a static link that will be indexed by Googlebot and other spiders but also make users see the subsequent page as it was customized by my partner websites. Nothing blackhat, just changes to the look and feel of the subsequent page by changing the PHP link’s parameters with javascript.

    So, essentially I am looking for an SEO intelligence report. Does Googlebot “tab” through links on a page, or does it use events like a mouse moving over a link as well?

    I have phrased this question a couple of different ways in other sections but have not gotten a good response yet. Any help out there????

    (PS–I have the code if you’d like to see what I mean)

  • Pingback: Javascript Links vererben PageRank

  • http://blog.pluginseo.com Dan

    Great news. Some murkier SEO techniques and link farms have been using Javascript to alter links post page load or use the onclick event to build up a URL in an effort to hide dodgy techniques and bad neighbourhoods from Google.

    The closer Google can get to emulating with their spider everything a human sees and navigates, the less spam and greater link coverage we’ll see.

    Dan

  • http://www.evanbot.com Evan Byrne

    My guess is that Google is using some sort of open source javascript engine such as Rhino and that’s what is enabling them to read content inside of javascript code.

  • Pingback: Bing, PageRank Sculpting und JavaScript | Der SEO Blog in Österreich

  • http://www.seojobsfinder.com/ Or Hillel

    That great news, most of the links from social media sites are with JS so now they good for SEO…

  • http://www.prosoncheng.com/ proson cheng

    ok that’s interesting. But we should never focus just on Google though they
    are dominating the search engines and just reply getting on SEO is unbalance and risky. If for some reasons your site is being blocked by your hosting, then what you can do? I happened once in my ex-hosts and I did loose a lot of search engine traffic due to this BS settings. So I realize I couldn’t just rely on one method to get traffic.

  • m.

    Googlebot is still not able to extract and follow JS links created with variables, e.g.
    document.write("Anch"+"ortext");
    Tested!

  • m.

    Could you please fix that? :)

  • Pingback: Bookmarks for June 22nd from 18:27 to 22:27 - Goldstein Media Blog

  • Pingback: Suchmaschinen & SEO – Juni 2009 - Inhouse SEO

  • chichi94

    Hi All,

    First of all, thanks for this article, it’s very intgeresting indeed.
    I’m still a beginner in SEO, but I am getting there step by step…

    I have a question regarding this info on GBot & Javascript and how the whole thing works…

    If you have the following
    Ancre

    And now “landing_page1.php” having a

    My question is, will GoogleBot just read http://www.mydomain.com (so +1 backlink) and skip the rest ? or will GB read http://www.abc.com ?

    Or is it SandBox material ???

    cheers

  • http://www.dataoutsourcingindia.com Sujit

    Useful information, thanks for sharing your knowledge Patrick!!

  • Pingback: How to Develop an SEO Link Building Strategy That Delivers the Goods

  • Pingback: How to Develop an SEO Link Building Strategy That Delivers the Goods (Link Value) | Affiliate Program Marketing Online

  • Pingback: How to Develop an SEO Link Building Strategy That Delivers the Goods (Link Value) | Wizpress.com

  • http://adworkz.com David Johnston

    One of our programmers predicted this almost 8 months before this post or so. Very interesting. My opinion is that Google will someday index all forms of code and rank it according to how the browser renders the final version of the content. Its just a matter of time.

  • http://echealthinsurance.com/ jeremy

    Do javascript internal link menus count as much as internal html links? I have a js menu that users can click to get to their state as the html links take up too much space, but since I switched to the js menu I have noticed that my ranking for each state has gone down.
    So for the next week I am going to back to the plain old html links to see if I get a pop. The only issue is that I have completed many other on page SEO implementations so I won’t know for certain the answer to this question.
    Please let me know what the consensus on this is.
    thanks ahead of time

  • Pingback: aimClear’s 2009 Daily Training Link Library » aimClear Search Marketing Blog

  • Pingback: aimClear’s 2009 Daily Training Link Library » aimClear Search Marketing Blog

  • Pingback: aimClear’s 2009 Daily Training Link Library » aimClear Search Marketing Blog

  • http://www.sessel-24.de Sessel

    After we had a change from PR 0 to 2 on our project tus-hasede.blogspot.com on October 23rd there has nothing happened with our other websites. I guess that the pagerank will not be discontinued but maybe there will be just updates of single websites in the future and no “big update”.

  • http://www.rawist.com/ Matt

    Hi Patrick,

    What about links created in the html using document.write from an external javascript? Does Google pass pagerank through these?

    (The HTML and links are visible in FireFox’s source code. But not in safari’s source–it just shows the link to the actual JS file there.)

  • http://www.agriya.com Jon Clone

    Google constantly changes things up to keep webmasters on their toes. While they might have made that change 2 years ago, who knows what rules have they secretly implemented nowadays. With ever changing scripts and algorithms, we should always rely on the fundamentals for SEO.

  • http://www.maxpharm.co.uk Steve

    Is this still valid, I can’t seem to get google to follow my javascript links in the same document, been 8 weeks, pages have “follow” just not indexing