Ad

How To Make Html Created By Javascript SEOable ? How React.js Do That?

- 1 answer

my page is created by appendchild and innerHTML by javascript,how to make it good for SEO?

how react.js do that?

Ad

Answer

Your site is just fine for SEO as it is.

Edit: Google has a tool that shows you exactly how their bot sees your site: https://support.google.com/webmasters/answer/6066468

Oh but first, let's define a really narrow definition of SEO as "when Google crawls my page, it will see the same text that the humans see when they view my page".

Google has been executing JavaScript when indexing for years. Officially two years ago, a confirmation of sorts a year ago.

I have no idea if Bing makes an attempt to run JS. Probably.

So when people say React is good for SEO, they probably either don't know that Googlebot runs JavaScript, or they're talking about Google's performance penalty for slow sites, which is valid.

That for me is one of the best reasons to use React with server-side rendering. Your site will load a lot faster because it doesn't need any JavaScript to load before the humans can start reading. This is good for SEO.

(Having said all that, high quality content is the real SEO juice.)

Ad
source: stackoverflow.com
Ad