1

What would be the best way to get Google to index a react app. Google can now read JavaScript, so no pre-rendering or isomorphic application is needed.

But what about internal links on a page? We use onClick all over the place.

Are there any meta tags to tell googlebot about the links on the page?

2
  • Yes googlebot render Javascript very well, though you can still test it on Google Fetch tool, and yes Google index your onClick links as well.
    – Goyllo
    Commented Sep 25, 2017 at 6:27
  • Use Fetch as Google to see if the Googlebot can view your content the same way visitors would. Mostly likely it's just fine, unless you've added highly complex JavaScript that confuses it (e.g., like hiding or obfuscating URLs).This article demonstrates that all the major (U.S. based) search engines can index it.
    – dan
    Commented Sep 25, 2017 at 6:29

1 Answer 1

1

Google parses a page much the same way a web browser does including processing JavaScript and then evaluating the DOM to identify what the end user would see the page as. In this way Google is able to identify on click events that redirect a page and follow those links. There is no special tags you have to add anymore to tell Google how to navigate your site. The rule of thumb now is that if an end user can see it without logging in (unless you provide Google with a login account to index protected pages) then Google can see it, crawl it, and if appropriate index it

2
  • In this way Google is able to identify on click events that redirect a page and follow those links Is there any link that tells that google will be able to figure out all the onclick handlers that do redirect ? or are you assuming it ?
    – Robin
    Commented Oct 2, 2017 at 11:25
  • Googlebot has for years been picking links out of JavaScript and following them. We know this because you sometimes get 404 errors from JavaScript strings that Googlebot seems to have assumed looks like a link. It isn't clear that Google passes PageRank properly across links that rely on JavaScript. Commented Oct 12, 2017 at 11:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.