7
10 Comments

How do you manage the SEO in a React JS web app?

Hello world

posted to Icon for group Developers
Developers
on January 20, 2020
  1. 5

    I use Next.js for my React apps so that all pages are server-rendered and easily indexed by Google. Other than that, SEO is the same for any other app: proper meta tags, back-links, etc. Any issues you're running into specifically?

    1. 1

      Yeah - Next.js is awesome for this! SSR out of the box, no more SEO woes!

      1. 1

        How big/steep a learning curve is SSR if you have never done it?

        1. 3

          Next.js makes it quite straightforward - if you already know React then you should be good.

  2. 3

    You need to ensure you have server-side rendering. Gatsby and Next are some good frameworks to use otherwise you can find a tutorial here: https://alligator.io/react/server-side-rendering/

  3. 2

    You can also use services like https://prerender.io if you just started a website without server-side-rendering. Of course, I would recommend using SSR for SEO purposes, but prerender.io is a nice tradeoff. And the best part of it? It is completely open-source which means you can host your own prerender service for free :)

  4. 2

    React Helmet is a nice component that can help you manage meta tags that are relevant to SEO.

  5. 1

    Most search engines deal fine with SPAs nowdays, just make sure the first content your page renders is actually the content you want the search engine to see and that your routes are set-up correctly. I think you can have good SEO in a React JS app without server side rendering.

  6. 1

    This comment was deleted 6 years ago.

Trending on Indie Hackers
Never hire an SEO Agency for your Saas Startup User Avatar 100 comments I shipped a productivity SaaS in 30 days as a solo dev — here's what AI actually changed (and what it didn't) User Avatar 81 comments A simple way to keep AI automations from making bad decisions User Avatar 67 comments “This contract looked normal - but could cost millions” User Avatar 54 comments 👉 The most expensive contract mistakes don’t feel risky User Avatar 41 comments Are indie makers actually bad customers? User Avatar 36 comments