Open nworden opened 5 years ago
- Don't deal with it with React, serve Lite/AMP UI to robots so we can just stick with what we've been doing. The disadvantage of this is that there's a lot of bot user agents so this might not be feasible or practical.
Another disadvantage here is that search engines may consider that our site is cloaking, because we return different pages to bots and real browsers, which (I believe) they discourage.
At a glance, use of react-helment sounds good to me, since (I believe) we do not have immediate plan of server side rendering.
Another potential option is to implement the logic in the server side (i.e., we do the same thing as we do today only for the meta tag part). It should work because (I believe) search engines always directly fetch pages, not following links by running JavaScript (which causes pushState).
We're currently keeping bots away from certain pages (namely search results and person record pages) with a meta tag, implemented here, but it's not going to be that easy with the React app. We can't use a robots.txt file because PF lives in a subdirectory (google.org/personfinder).
I think there's a couple options: