JavaScript SEO is the work of making sure sites built with JavaScript frameworks such as React, Vue, Angular or Svelte can be crawled, rendered and indexed properly. It is one of the more technical corners of technical SEO, and it matters because content that only exists after scripts run can be delayed or missed.
How Google handles JavaScript
Google processes JS pages in two waves. First it crawls the raw HTML. Then, when resources allow, it renders the page in an evergreen version of Chrome and reads the final content. Rendering is now fast for most sites, but problems remain when scripts fail, are blocked or rely on user interaction. Other search engines and many AI crawlers render little or no JavaScript at all.
Rendering options
- Client-side rendering (CSR): the browser builds the page. The initial HTML is nearly empty. Riskiest for SEO.
- Server-side rendering (SSR): the server sends complete HTML, then JavaScript takes over. Best of both worlds.
- Static site generation (SSG): pages are pre-built at deploy time. Fast and SEO-friendly.
- Hydration and hybrid approaches: frameworks like Next.js, Nuxt and Astro mix SSR, SSG and client rendering per route.
Google no longer recommends dynamic rendering (serving bots a different version) as a long-term solution.
Common JavaScript SEO problems
- Links that are not links: navigation built with onclick handlers instead of a href. Google only follows real anchor tags with href values.
- Content loaded on scroll or click that Googlebot never triggers.
- Blocked resources: JS or API endpoints disallowed in robots.txt.
- Hash-based URLs such as /#/products, which Google treats as one page.
- Metadata set by scripts: titles, canonicals or noindex tags changed after load can conflict with the raw HTML.
- Soft 404s: single-page apps that return 200 for missing pages.
How to test a JavaScript site
- Use URL Inspection in Google Search Console and view the rendered HTML and screenshot.
- Compare View Source (raw HTML) with Inspect Element (rendered DOM).
- Crawl with JavaScript rendering enabled in Screaming Frog and compare results with rendering off.
- Search Google for a sentence that only appears after JS runs.
Best practices
- Render critical content and links on the server.
- Use the History API for clean URLs.
- Return proper status codes for missing pages.
- Keep titles, canonicals and structured data in the initial HTML.
- Watch JS bundle size, which affects Core Web Vitals.
Frequently asked questions
Can Google index React sites?
Yes, but server-side rendering through Next.js or similar makes it far more reliable.
Do AI crawlers render JavaScript?
Many do not, so server-rendered HTML also helps AI search visibility.
Related terms
See mobile-first indexing, crawling and indexing and the SEO encyclopedia.
