0

I am building a front end rendering SPA using react.

It seems that the spider from google is able to run the js script, perform the ajax requests, render the whole page and cache it which is nice.

However, it seems that google think everything in SPA is in the root path

The figure below shows google result of one of my blog article (http://www.largetimber.com/post/2)

Google think it comes from the root path which is not.

enter image description here

Here is my question: Is there any tricks that I could do to let the google find the correct URL?

Thanks for any help.

4
  • Have you tested your pages with Google Fetch? since this is how you determine what Google can read and see. Jun 29, 2018 at 17:32
  • Hi, thanks for your reply.It's really helpful. I check the google fetch and it can only capture my home page. But there is another question, the information I searched is actually not available in the home page, how did google catch it ? Jun 29, 2018 at 17:52
  • Google will only capture what it sees in the Google Fetch Render. Jun 29, 2018 at 18:01
  • Yes, that's what I thought. And that's why I am course why the content in the figure can be caught by google. Home page is the only page that will be parsed properly and the content is not in the home page...Is it possible that in most of the time the ajax request is timeout but it success few times and that's the reason why google still get these pages ? Jun 29, 2018 at 18:49

1 Answer 1

1

You can to implement server side rendering in order to let the search engines bots correctly index your website. See an exemplary solution and more details about JavaScript frameworks and Google.

2
  • Hi, thanks for the answer. I've tried the ssr using node before and I knew it works. However I am using dotnet core for this project and adding a node middleware is too complicated. Actually SEO is not targeted but I am just curous about whether it could be possible after seeing google's strong ability in parsing javascript and ajax. btw, your second link is very helpful Jun 29, 2018 at 18:46
  • Yes, Google can render JavaScript, but still it is the best solution to have server side rendered version for best search performance/ranking - source. If you use .Net Core then have a look here. Jun 29, 2018 at 19:22

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.