Check my websiteGuidesAbout
Fecto / Guides / Single page app SEO

Single page app SEO

A single page application can be indexed, but by default it answers every URL with the same HTML and status 200, so missing pages look real and the text only exists after JavaScript runs. Request a URL that doesn’t exist on your site: if you get your app back with a 200, start there.

Free, about ten seconds, no account.

Why SPAs trip crawlers

A static host serving an SPA is usually told to send index.html for any path, so the client router can take over. That rewrite is what makes deep links work, and it is also why the server never says “not found”: it can’t know which paths the router will accept.

Google’s own guidance names two ways out. Either redirect, in JavaScript, to a URL the server really answers with 404, or add a noindex robots tag from JavaScript on error views. It also warns the other way round: if the page starts with noindex and a script removes it later, Google may never run the script. And it asks for real paths with the History API rather than #/fragments, because fragments don’t load different content as far as Google is concerned.

Everything else follows from the HTML being the same for every route: one title, no route-specific text, nothing for a bot that doesn’t run scripts.

Common causes, and the fix for each

Every URL answers 200

Fecto check index.soft-404 · Missing pages return 404

Fecto requests a path that can’t exist. The cleanest fix is a server-side list of valid route patterns, with anything else answered as 404 before the SPA loads. Where the host can’t do that, the fallback is Google’s JavaScript redirect to a real 404 URL.

Text that only exists after the router runs

Fecto check read.main-text-needs-js · Main text is in the HTML

Prerendering the public routes at build time gives each one real HTML and leaves the app behaviour untouched. The check runs per page, so you can start with the pages that bring visitors.

Routes the server doesn’t know about

Fecto check index.not-in-sitemap · Page is in the sitemap

The routes live in client code, so nothing generates a sitemap from them. Your agent exports the route list at build time and writes the sitemap from it, and the check confirms each public page is listed.

Hash links and click-handler navigation

Fecto check act.faux-controls · Real links and buttons

Links built as #/pricing or as buttons that call the router give crawlers nothing to follow. Real <a href="/pricing"> elements with History API routing fix discovery.

A noindex added by the shell

Fecto check index.noindex · Page may be indexed and quoted

Some SPA shells ship noindex in index.html and remove it once data loads. Google may stop before the script does. The check reads the served tag, which is the one that counts.

Let your agent do it

Your agent looks at the host config (rewrites, redirects, the 404 file) as well as the app, since half of these fixes live there. Host settings it can’t change from the repo come back to you as a blocked step with the exact setting named.

Claude CodeClaude appCodexCursor

No coding agent yet? Install the Claude app, sign in, then come back and choose Claude app.

Set it up by hand
curl -fsSL https://fecto.ai/install | sh

Then tell it

Use Fecto to check and fix my site.

Don’t buy dynamic rendering for Google alone

Serving bots a separately rendered copy was a workaround Google itself now describes as such. If you are going to render HTML, render it for everyone at build time.

What it costs

You pay only when the result shows up on your site: +20% more visits or enquiries is $30, +50% is $60, double is $100, and anything below +20% costs $0. Never more than $100 a site a month.

Questions

Is a single page application SEO friendly?

It can be. Search engines can index an SPA that uses real paths, answers missing URLs properly and puts each route’s text in its HTML at build time. Out of the box, most SPAs do none of the three.

Do Angular and Vue apps have the same problems?

Yes. These come from client routing, not from one framework. Fecto’s check looks for the usual markers, such as an empty #root or #app element, or an Angular app-root, whichever framework produced them.

How do I list SPA routes in a sitemap?

Export the public route table from the router config, expand dynamic routes from the same data the pages load, and write the sitemap during the build. Keep private routes such as account and checkout out of it.

Google’s URL inspection shows my content. Am I fine?

For Google, probably. URL inspection shows the page after Googlebot renders it. Fetch the same page without JavaScript to see what other crawlers get; that is what the scan does, and it is where SPAs usually fall short.

Related guides

  • React SEO problems
  • Lovable SEO
  • Bolt.new SEO
  • Replit SEO
  • Next.js SEO
  • All guides

Checked against Google Search Central: JavaScript SEO basics on 18 November 2026.