Issues with prerendering

I turned on pre-rendering for my site -

It’s a create-react-app and I’m using react-helmet-async for generating dynamic meta-tags.

This issue is that when I preview my links, meta-tag is only shown for the homepage. In other wors, only the homepage is previewed. the about and privacy page which also have dynamic meta-tags set up, don’t return any preview.

I woul like to know how to fix this.

Create React App generates a single index.html. There are no “pages” for your site. All the routes that you might think as pages are nothing but index.html. So for every URL, it’s just the pre-rendered index.html that gets served.

I know, but the meta tag for the homepage (og tags) that was pre-rendered was from react-helmet-async in one of the components. Why are other components with react-helmet-async not returning any pre-render?

All your pages take a really long time to pre-render (sometimes even fail) and when they finally pre-render, they return a blank webpage. I’d recommend you to try debugging the pre-rendering locally: GitHub - netlify/prerender: Automatically rendering JS-driven pages for crawlers and social sharing