I spent nearly 3 hours debugging why my React app looked perfect in the browser but turned into a blank card when shared on Twitter.
No image. No title. No description.
Just a sad naked URL.
The frustrating part was that my meta tags were technically correct. The real issue was simpler: most social crawlers do not execute client-side React the same way browsers do.
In this article, you’ll learn how to fix Open Graph React SEO properly using server-rendered meta tags, generate dynamic OG images, and avoid the most common SEO mistakes in React apps without rebuilding your entire stack.
The React SEO Problem Nobody Notices Until Production
If you’ve built a React SPA using Vite, CRA, or React Router, your index.html probably looks something like this:
<!DOCTYPE html> <html lang= "en" > <head> <title> My React App </title> <meta name= "description" content= "Cool app" /> </head> <body> <div id= "root" ></div> <script type= "module" src= "/src/main.jsx" ></script> </body> </html>
Enter fullscreen…