DEV Community

Cover image for Is Create-React-App Good For SEO?
Taimoor Sattar
Taimoor Sattar

Posted on • Originally published at taimoorsattar.dev

11 5

Is Create-React-App Good For SEO?

In short, create-react-app is not good for SEO.

why?

create-react-app is a SPA (single page application). In a SPA, all necessary HTML, JavaScript, and CSS code retrieved by the browser with a single page load or data add dynamically to the page based on certain actions.

Search engines and social media look for SEO meta tags on the website. Based on these meta tags, display formated content to the user.

By default in create-react-app, metatag like title and description mentioned in public/index.html. When the page loads, the default title shows in the tab of the browser and for every route, it follows the same.

What if, you are fetching an article post from an API and after fetching the data, it updates the value of title and description. But the default title shows up in the SEO, not the fetching title. If your app depends on SEO then it is a huge problem.

So how you can overcome this?

You need to prerender the create-react-app. To prerender, You can download either of two npm package as below:

The above plugins work well if you are not using Windows / local storage objects in your project (Javascript), else you need to follow some extra checks.

Moreover, you can use Gatsby and the next JS are the frameworks that are built on React with SEO friendly pre-rendered website.

You can follow me on Twitter @taimoorsattar7 for more updates.

Sentry blog image

How to reduce TTFB

In the past few years in the web dev world, we’ve seen a significant push towards rendering our websites on the server. Doing so is better for SEO and performs better on low-powered devices, but one thing we had to sacrifice is TTFB.

In this article, we’ll see how we can identify what makes our TTFB high so we can fix it.

Read more

Top comments (4)

Collapse
 
ronca85 profile image
ronca85

why even use react?

Collapse
 
deexter profile image
deexter

You can use nextjs for your main site, but you can build app and in this case you should use react.

Collapse
 
taimoorsattar7 profile image
Taimoor Sattar

next, Gatsby and create-react-app are all built on React. But all of these have the different infrastructure.

create-react-app: Single-Page-Application
Gatsby: Static site Generator
Next JS: Static and server sider prerender

Collapse
 
slimcoder profile image
Slim Coder

Wow! Thank you Taimoor for this blog.

Billboard image

Create up to 10 Postgres Databases on Neon's free plan.

If you're starting a new project, Neon has got your databases covered. No credit cards. No trials. No getting in your way.

Try Neon for Free →

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay