How can I implement static pages in my React app for better SEO?
Asked by
CreativeCactus72
Hey everyone,
I'm working on a single-page React app, but I'm looking to add static or server-side rendered (SSR) pages for landing and blog purposes to improve SEO. I'd love to hear any recommendations on the best approach. Should I switch to using Gatsby for this, or maybe create a separate static microsite hosted on Netlify? I appreciate any feedback you can offer!
Answers
Have you looked into Astro? It's really great at handling this kind of setup. You can even mix it up a bitโuse Astro for the marketing side and keep your React SPA for the rest. It's a solid combo!
Reply to this answer
There are a ton of ways to go about it, honestly. If you've already built your SPA, you don't necessarily need to start from scratch. Are you hoping to share code between your static pages and your existing app? If so, letโs discuss what exactly you're looking to shareโcomponents, styles, or something else.
Reply to this answer
While I'm a big fan of Gatsby, I think you might find better options nowadays. Astro, Next.js, or even Tanstack Start could work really well for what you're trying to do.
Reply to this answer
If you have defined static assets and routes, then itโs pretty straightforward. Just let me know if your app fits that mold!
Reply to this answer
If you have shared components you want to use, I recommend trying Next.js. It handles static exports really well.
Reply to this answer
Add your answer
Answers are reviewed before publication.
Related Discussions