GlossarySEO
What is JavaScript SEO?
Also called: JS SEO, SPA SEO, React SEO
Definition
JavaScript SEO is making sure sites built with JavaScript frameworks can be crawled, rendered and indexed properly: real links, content in the HTML, correct status codes and metadata that doesn't depend on client-side code.
JavaScript SEO, explained
Google can render JavaScript, but its own JavaScript SEO guide lists the places where apps go wrong. Links must be <a> elements with an href attribute to be discovered; buttons and click handlers that change the route aren't followed. Client-side routing should use the History API, not URL fragments like #/pricing, because Google doesn't reliably treat fragments as separate pages.
Status codes are the next trap. A single-page app often returns 200 for every path and shows "not found" in the browser, which creates soft 404s. Google suggests either redirecting to a URL where the server returns 404, or adding a noindex robots tag on error views. It also warns that when Google sees noindex it may skip rendering, so removing a noindex with JavaScript may not work.
Metadata matters too. Titles, descriptions, canonicals and structured data set only on the client may be picked up after rendering, but they're slower and less reliable, and non-Google crawlers and link-preview bots won't see them. Put them in the server response.
Google's guide still recommends server-side rendering or prerendering, because it makes sites faster for users and crawlers and not all bots can run JavaScript. Modern frameworks like Next.js, Nuxt, SvelteKit and Astro make that the default, which is why most JavaScript SEO problems today come from older client-only apps or from pages that opt out of server rendering.
Why it matters for founders
If your marketing site is a client-rendered React app, some crawlers see an empty shell. The fix is usually a framework setting, not a rewrite.
Example
Your SPA's blog links are <div onClick> elements. Google finds the homepage but none of the posts. You switch to <a href> links rendered on the server, and the posts start getting crawled.
Common mistakes
- Navigation built from buttons and click handlers instead of links.
- Hash-based routes like
/#/features. - Returning
200for every route, including missing ones. - Setting titles and canonicals only in client-side code.
Sources
Checked
Related terms
- RenderingRendering is when a search engine runs a page's JavaScript and CSS in a headless browser to see the final content, as a user would. Google renders pages before indexing what it finds.
- Server-side rendering (SSR)Server-side rendering (SSR) means the server builds a page's full HTML for each request and sends it ready to display. Crawlers and users get content immediately, without waiting for JavaScript.
- Soft 404A soft 404 is a page that looks like an error or empty page to Google but returns a success code (
200) instead of404. Google treats it as not found and reports it in Search Console. - Internal linkingInternal linking is linking from one page on your site to another page on the same site. It helps visitors and crawlers find pages and tells search engines which pages matter and what they're about.