: 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?
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>
More posts by @Smith883
1 Comments
Sorted by latest first Latest Oldest Best
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.
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.