Client-Side React & SEO

Can Google index a client-side React app?

Updated: Dec 18, 2016 — The test app has been taken down, but results are still below.

Updated: May 7, 2016 — TL;DR: Yep.

Tests have shown that Google's crawlers are able to render content generated by JavaScript. Google has said as much, and their ajax crawling recommendation has been deprecated, but I haven't seen a test with React yet. So, I set one up to determine if Google would render, crawl, and index a simple client-side React app without server-side rendering.

Setup

I created a basic React app with three pages of content for a topic that should be easy to rank for, “Chris Arasin's Soup Recipe”. The index.html page does have the appropriate initial title tag, “Chris Arasin's Secret Soup Recipe”, but all the content, links, images, and other page titles are rendered by React.

I used React Router, and my test is pretty much just its demo setup. You can see the code here.

The setup includes:

  • An index page with an image rendered by React
  • A secondary page with a link to it from a static html page
  • A secondary page with only a React-generated link pointing to it

Results

Google fully indexed the test app. A Google Webmaster Tools fetch and render showed the index page fully rendered.

Google Fetch and render screenshot of the React app

A search for Chris Arasin's soup recipe showed all three pages indexed. Including the instructions page, which was only linked to by a React-generated link.

Screenshot of Google search results for primary keyword

Searching for text on a page returns the proper result.

Screenshot of Google search results for on-page content

And the image has been indexed.

Screenshot of Google image search results

Cool! But, Don't Forget Bing

This is a nice result, and perhaps with some tests of more complicated applications, I would not have Google search concerns about using React without server-side rendering.

However, other search engines do not necessarily have the javascript rendering capabilities of Google. The numbers can vary, but these days, 20-30% of search traffic is from Bing or Bing-powered Yahoo. These numbers will vary depending on the audience of your site, but that is a significant portion of a site's search audience. The test site was not indexed by Bing. So while this is an encouraging result from Google, it's definitely worth checking out your Bing traffic before making any server-side rendering decisions.