Mobile app version of vmapp.org
Login or Join
Smith883

: React - Google only indexing main Page I have a react built app. And Google is only indexing the main page "/". I don't understand how React and SEO work together. Do you have any tips?

@Smith883

Posted in: #ReactJs #Seo

I have a react built app. And Google is only indexing the main page "/". I don't understand how React and SEO work together. Do you have any tips? Any help would be appreciated.

I have tried the Google Fetch and Render tool, and it only fetches the main page.

Link Example:

goToPhoto(pageName) {
const {history} = this.props;
history.push(`/photo/${pageName}`);
}

<a onClick={() => this.props.goToPhoto(photo.pageName)}>`${photo.title}`}</a>

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Smith883

1 Comments

Sorted by latest first Latest Oldest Best

 

@Kimberly868

The old answer used to be use a product like Prerender.io in order to get Google to crawl it. Google has started processing Javascript and although a product that pre-renders a page for the engine makes life easier it's not the only answer.

A common problem I've encountered is that if your app takes too long to load, if your AJAX calls or event loops take more than 2-3 seconds, Google will not wait. It will go with what it's got, links included. The solution to this will depend very much on your architecture but I would suggest looking at speed, caching, CDN and other factors that could make it difficult for Google to load in under 5 seconds.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme