Modern web apps built with React, Vue or Angular feel fast and smooth, but they can be surprisingly hard for search engines to understand. If your content only appears after JavaScript runs, some crawlers see an empty page, and even Google may index it later than you would like. This guide explains the problem and the practical fixes.
The single-page app challenge
A classic single-page app (SPA) sends the browser an almost empty HTML file and builds the page with JavaScript. That causes several SEO problems:
- Delayed indexing. Google can render JavaScript, but rendering happens in a second stage that can lag behind crawling.
- Other crawlers and previews. Some search engines, and the link previews on WhatsApp, LinkedIn and other platforms, read the raw HTML only.
- Shared metadata. Without care, every route shares the same title and description.
- Soft 404s. A missing page that returns a "200 OK" status with a "not found" message confuses search engines.
- Performance. Large JavaScript bundles slow the first meaningful paint, which affects Core Web Vitals.
Choose the right rendering strategy
Server-side rendering (SSR)
The server builds the full HTML for each request. Crawlers and users get complete content immediately. Best for pages that change often or are personalised, such as search results or dashboards with public parts.
Static site generation (SSG)
Pages are built as HTML ahead of time and served from a CDN. The fastest and cheapest option for content that changes rarely: marketing pages, articles, documentation.
Incremental regeneration
A hybrid offered by frameworks like Next.js: static pages that are rebuilt in the background when content changes, combining static speed with fresh content.
Prerendering a client-rendered app
If moving to a framework is not practical, you can generate static HTML for key routes at build time. Google now describes dynamic rendering, which serves crawlers a different version from users, as a workaround rather than a recommended long-term solution, so prefer approaches that give everyone the same HTML.
Most products use a mix: static pages for marketing and content, server rendering where data changes often, and client rendering for logged-in areas that do not need to rank.
Get the on-page basics right
Unique titles and descriptions
Every indexable route needs its own title (roughly 50 to 60 characters) and meta description (roughly 150 to 160 characters) that describe that page, set in the HTML the server sends where possible.
Canonical URLs
Add a canonical link to each page so variations, such as tracking parameters or filter combinations, point to one preferred URL.
Clean, crawlable URLs
Use real paths like /services/web-development, not hash routes like /#/services. Keep URLs short, readable and stable, and use 301 redirects when they must change.
Real links
Navigation must use anchor elements with an href. Buttons with click handlers are invisible to crawlers, which follow links, not JavaScript events.
Proper status codes
Return a genuine 404 status for missing pages and 301 for moved ones. In a client-rendered app this may need server or hosting configuration, or at least a noindex tag on the not-found view.
Headings and content
One H1 per page that matches the topic, logical H2 and H3 sections, and enough useful text for the page to answer the searcher's question.
Images
Descriptive alt text, sensible file names, modern formats and explicit dimensions to avoid layout shift.
Structured data
JSON-LD structured data helps search engines understand your content and can make pages eligible for richer results. Common types:
- Organization and LocalBusiness for your company details.
- Article or BlogPosting for content.
- Product with offers and reviews for e-commerce.
- BreadcrumbList for site hierarchy.
- FAQPage for question-and-answer content, keeping in mind that Google shows FAQ rich results for only a limited set of sites today.
Validate your markup with Google's Rich Results Test, and only mark up content that is actually visible on the page.
Sitemaps and robots.txt
- Keep an XML sitemap with every indexable URL and an accurate last-modified date, and submit it in Google Search Console.
- Use robots.txt to keep crawlers out of areas such as admin and checkout, but never block the JavaScript or CSS files needed to render your pages.
- Use noindex on pages that should be reachable but not appear in search, such as login and account pages.
Performance is part of SEO
Core Web Vitals are part of Google's page experience signals, and speed affects how many visitors stay. Focus on:
- Fast Largest Contentful Paint: optimise the hero image or headline and avoid render-blocking resources.
- Good Interaction to Next Paint: ship less JavaScript and break up long tasks.
- Low Cumulative Layout Shift: reserve space for images, ads and embeds.
Our guide to frontend performance optimization goes deeper.
Infinite scroll and filters
- Back infinite scroll with paginated URLs that crawlers can reach.
- Decide which filter combinations deserve their own indexable page; canonicalise or noindex the rest to avoid thousands of thin duplicate pages.
International sites
If you serve several languages or regions, use separate URLs for each version and hreflang annotations so search engines show the right one.
Technical SEO checklist
- Every route has a unique title, description and canonical URL.
- Important content is in the HTML the server sends.
- Navigation uses real links.
- Missing pages return 404; moved pages return 301.
- A sitemap is submitted and robots.txt blocks only what it should.
- Structured data validates without errors.
- Social preview tags (Open Graph and Twitter cards) are set per page.
- Core Web Vitals pass on mobile in field data.
- Search Console shows no major coverage or indexing errors.
Tools
- Google Search Console for indexing status, URL inspection and Core Web Vitals.
- PageSpeed Insights and Lighthouse for performance.
- Rich Results Test for structured data.
- A crawler such as Screaming Frog to find broken links, missing titles and redirect chains.
Conclusion
Modern frameworks and good SEO are fully compatible. Send real HTML for the pages that need to rank, give each route its own metadata, use real links and status codes, and keep pages fast. If you want an SEO review of your web app, get in touch.