SiteCozy

  • My account

Does Googlebot crawl javascript links? Experiment

2018-09-02

Our experiment

Rather than using HREF in an “A” tag to create a link, we used “onclick” followed by Javascript method to open a new page in the browser. This added an event to the text. In this case, it is Javascript that handles the new page opening. Beneath the text “This is a javascript link click on it” below we added the code. We waited for Googlebot to crawl this page and we looked into the Google search results to find the page that is hidden behind the Javascript link.

The code is the following:

<div onclick="window.open('/surpriXX.html','_self');"><b>This is a javascript link click on it</b>
</div>
This is a javascript link click on it

Then, We looked into Google to see if we could find the page by doing: site:sitecozy.com surprise. The page has not been crawled. This is the proof Google does not crawl Javascript links.

Googlebot does not crawl Javascript and it was confirmed by Google. Google only crawls A HREF tags. Below you can find a video found on the Youtube channel from Google dedicated to Webmasters. The Google presenter mentions that Googlebot does not crawl Javascript links.

While this page has been crawled, the page behind the javascript link hasn’t been crawled.

Related Posts:

  • Why we uninstalled Ajax search forms
  • What types of external links may harm your PageRank?
  • Can affiliate links hurt your ranking in Google?
Download our Broken link checker freeware here Buy a license key for the Sitecozy broken link checker

Customer Login

Lost password?

Categories

  • Webmaster advice
  • SEO advice
  • Web hosting
  • SiteCozy link checker KB
  • WordPress theme & plugin reviews
  • All articles
Disclosure: We are a professional review site that receives compensation from the companies whose products we review. We test each product thoroughly and give high marks to only the very best. We are independently owned and the opinions expressed here are our own.

Copyright Sitecozy 2018