Does React Router index pages to Google?

1.1k views Asked by At

I want to create a personal blog with React and my question which I was unable to find is whether the library React Router would give access to Google to index my blog articles.

I was planning on using Meteor with React and having a reusable component child who will get specific parameters when an onClick event occurs and with that parameter make a query to the database and get the article data to display it.

By doing this will Google index all my articles? Or should I do it another way?

4

There are 4 answers

1
Moonjsit On

Anwser to this question is not straightforward, but in short - no.

I would suggest server side rendering, since google bot still does not handle spa as good as static HTML.

Check out next.js or remix.run.

0
Illia Bukatych On

If you want to start personal blog, maybe the best approach will be to use framework that based on React and has an option of Static Generation.

Check one of these:

Both has pretty good documentation and community.

0
Paul Paulincai On

Router does...routing. For your case you will need:

  • React Router for routing.
  • React Helmet (https://www.npmjs.com/package/react-helmet) to inject your HTML headers for your blog pages (title, description, image of different image sizes for social media).
  • You will also need a sitemap.xml in your public folder.
  • Meteor SSR or Prerendering. Prerender.io has a 0$ service for small blogs of up to 250 pages: https://prerender.io/pricing/ Meteor + React is a great way to keep a blog. With a front end library like MUI or Bootstrap or pretty much anything else, you can score 100% on Google Page insights. If you prefer Bootstrap, note there is a Reactstrap library. If your previews are not being generated instantly in Whatsapp share or social media, I keep a version of Helmet that injects the headers at the very top instead of ... very bottom. If you run into any challenges, just find us on the Meteor forum as well.
1
DenisBradford On

As far as I know, React Router doesn't directly affect how Google indexes your pages. It's hard to say whether Google will index all your articles. However, following best practices like using descriptive titles and meta descriptions, using header tags to structure your content, and optimizing your images can all help improve your website's SEO and increase your chances of being indexed by Google. However, there are some best practices you can follow to ensure that your blog articles are properly indexed by Google. One key strategy is to use foundational links, which are high-quality links from authoritative websites that can help improve your website's ranking on search engines like Google.