P
P
Petrichor2018-09-23 03:08:11
Search Engine Optimization
Petrichor, 2018-09-23 03:08:11

How to make ReactJS site friends with search robots?

There is a site on which now 7 pages, I rewrite it on ReactJs. PHP backend.
What are the search engine optimization solutions?
Google writes that its search robots can run js, it's not entirely clear about Yandex.
The first thing that comes to mind is to put the rendered html in an App block which, if the js is running, will contain the React app and the static markup if not.
But the question arises, what to do with all the pages, because they actually do not exist and react router is used to navigate through them.
I only have basic PHP skills so server rendering seems complicated, maybe there are easier ways?
Google also writes that it does not recommend changing content specifically for robots in any way, can it lower it in search results if a site without js looks different than with it?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
E
Evgeny Yudin, 2018-09-23
@Petrichor

Neither Google nor Yandex will lower the issue.
If your site is built entirely on ReactJS, then you need to render pages for the web crawler.
Read the recommendations of Google and Yandex and you can look towards SaaS https://prerender.io/
https://yandex.ru/support/webmaster/robot-workings...
https://support.google.com/webmasters/answer /81766...

A
Andrey K, 2018-09-23
@kuftachev

I would start with the simplest, at the search engine itself you can see how the robot sees the page.
I looked when choosing between Angular and Vue. The second had everything visible, while the first had only empty blocks with markings.

A
Anubis, 2018-09-24
@Anubis

React is quite good at server-side rendering, at least in conjunction with Redux or Mobx. Everything that is of value to search engines, render on the server, then give it as ready-made html, you get the rest additionally after initializing the site engine in the browser. For example, we prepare the site menu, the most important sections and the text of the article (we receive and render in html) on the server, and the comments to the article are already on the client in the usual React way.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question