4 ms·
If I'm building a site where SEO is paramount, am I safe using React and SSR? I'd kinda like to, but my inclination is to stick with a traditional server page a
by tootie 9y ago
If I'm building a site where SEO is paramount, am I safe using React and SSR? I'd kinda like to, but my inclination is to stick with a traditional server page approach.
- andrewingram 9y agoSEO-wise there's no difference other than performance. But it was possible to build high-performance SSR sites with React 15, and with React 16 it's even easier. The more important thing to decide is whether the development model of React is suitable for your needs.
- emilecantin 9y agoWe're actually doing this right now with tylio.com. We get pretty high scores (95+) on the various test tools (Pagespeed, Lighthouse, etc.) using React 15. Our biggest remaining issues right now are First Meaningful Paint and Time to Interactive, and I expect React 16 to help a lot in that aspect (streaming render + simplified rehydrate), can't wait to test it!
- benregenspan 9y agoBecause it is hard to know the implementation details of every search engine and what reasons different markup could result in a subtle difference in ranking, I think the best way of answering this question is looking at the markup differences between HTML produced via ReactDOM.renderToString() vs. some other solution. In versions of React prior to 16, some extra attributes were added to the markup, but besides that it looked basically identical to what you'd get using any other method. Now there is even less difference, so it's hard to imagine React SSR having significantly different SEO characteristics. But one caveat is that if you need to hydrate serverside-rendered React markup for clientside use, that will add at least some small performance penalty. And you will also want to pass in props data that matches as closely as possible between the client and server, which means that your base page will need to include some serialized version of the data that should be passed in as props to the component(s) you serverside-rendered and want to hydrate. If this is a large chunk of data, there could be negative SEO impact if it is placed above meaningful content in the page or if the time to download it delays complete load of the page.
- abritinthebay 9y agoAs long as you're doing SSR, absolutely. The crawler would read it no differently.
- photonios 9y agoDefinitely. As said below, SSR is definitely the way to go if you care about SEO. Although Google claims to be able to handle client-side rendered web pages, it won't work as flawlessly. I work on Asia's largest real-estate portals and we use React 16 and SSR. If you want to talk more about what we've done, contact me: swen [at] sectorlabs.ro