Products SEO & GEO Agent Paid Ads Agent Website Agent Conversion Agent
How it works Pricing FAQ Blog Book a call

SPA SEO: how to get a single-page app indexed by Google

Updated · 8 min read

Short answer Google can index a single-page app, but it reads the page only after running its JavaScript, which can be delayed or fail, and many other crawlers, including AI crawlers, don't run JavaScript at all. Serve each page's text as HTML (server rendering or pre-rendering), give every view its own URL, and set a unique title per page.

Want help applying this to your business? Talk it through on a free 30-minute call.

Book a call

Can Google index a single-page app?

Yes, with a delay and some risk. A single-page app (SPA) sends the browser a nearly empty page plus JavaScript, and the JavaScript builds what the visitor sees. Google has to run that code before it can read your text. Google's JavaScript SEO guide says a page waiting for that step "may stay on this queue for a few seconds, but it can take longer than that." The same guide ends its explanation with the advice that settles the question:

"Keep in mind that server-side or pre-rendering is still a great idea because it makes your website faster for users and crawlers, and not all bots can run JavaScript." (Google Search Central: Understand the JavaScript SEO basics)
Who reads your siteRuns JavaScript?What it sees on a plain SPA
Google SearchYes, later, in a second stepYour content, if the code runs without errors
Other search enginesNot always. Google: they "may choose to ignore JavaScript"Possibly an empty page
AI crawlers (ChatGPT, Claude)No, in a December 2024 study of Vercel's networkAn empty page

The study is Vercel's: by monitoring traffic on its hosting network, it found "none of the major AI crawlers currently render JavaScript." If you want ChatGPT or Claude to quote your services, your text has to be in the HTML.

How do I check what Google sees on my SPA?

Three checks, in order:

  1. View the raw HTML. Open a page, press Ctrl+U (Cmd+Option+U on a Mac) and search for a sentence from the page. If it isn't there, crawlers that skip JavaScript see nothing.
  2. See Google's rendered version. Google says to use the Rich Results Test or the URL Inspection tool in Search Console to "check if the rendered HTML has all content you expect." Both show the page after Google runs your code, plus any JavaScript errors.
  3. Count indexed pages. Search Console's Pages report shows which URLs made it in. A site with 20 pages and 1 indexed URL usually has a URL problem (below). See Google Search Console for a small business.

If step 1 fails and step 2 passes, Google can read you but others can't. If both fail, fix rendering first.

SSR, pre-rendering or dynamic rendering: which fix?

Put the text in the HTML the server sends. There are three ways to do it, and Google recommends two of them.

MethodWhat it meansBest forCatch
Server-side rendering (SSR)The server builds each page's HTML when it's requestedPages that change often: prices, listings, stockNeeds a running server, more cost
Pre-rendering, or static site generation (SSG)Every page's HTML is built once, when you publishService pages, about, contact, blogA content change needs a new build
Dynamic renderingBots get a pre-built copy; people get the appStopgap for an old app you can't rebuild yetGoogle no longer recommends it

Vue's documentation gives owners a useful shortcut: if you are only looking at SSR to improve SEO for a few marketing pages, such as / and /about, you probably want SSG. On dynamic rendering, Google is direct:

"Dynamic rendering was a workaround and not a long-term solution for problems with JavaScript-generated content in search engines." (Google Search Central: Dynamic rendering as a workaround)

Google adds that it generally doesn't treat dynamic rendering as cloaking (showing bots different content than people) as long as both versions are similar.

React, Vue and Angular: where the fix lives

Each framework now ships its own way to render on the server. Your developer rarely has to build one.

Built withRendering optionPage titles and descriptions
ReactA framework such as Next.js or React Router. React's docs: "we recommend starting with a framework."Next.js: `metadata` or `generateMetadata`. React Router: a `meta` export per route
VueNuxt, which uses server rendering by default "to optimize search engine indexing"Nuxt: `useSeoMeta` or `useHead`
Angular`@angular/ssr`, added with `ng add @angular/ssr`. Angular apps are client-rendered unless you add itAngular's `Title` and `Meta` services
AI app builder (Lovable)New apps since May 13, 2026 (June 22 on Enterprise) use server rendering; older ones are pre-rendered for verified crawlersSet in the builder

Two names in older advice are out of date. Create React App was deprecated for new apps on February 14, 2025 (React Blog). Angular Universal moved into `@angular/ssr` in Angular 17, and its repository was archived on November 22, 2024. If a quote or a plan names either one, ask why.

Does each view need its own URL?

Yes. A URL is the only thing Google can index, so a service that has no address of its own can't rank on its own. Old SPAs often use addresses like `example.com/#/services`. Google's troubleshooting guide says the old scheme for those is gone:

"The AJAX-crawling scheme has been deprecated since 2015, so you can't rely on URL fragments to work with Googlebot." (Google Search Central: Fix search-related JavaScript problems)

The fix is routing with the browser's History API, which gives each view a normal address like `example.com/services`. Modern routers in all three frameworks do this by default. Links must be real links: Google says it can only discover links that are HTML link elements (`a` tags) with an `href` address. A button that changes the view with a click handler hides that page from Google. Then list every public URL in a sitemap and submit it in Search Console.

How do I set titles and meta tags per page in an SPA?

Give every URL its own title, description and canonical tag (the tag that names the main version of a page). Google says JavaScript may set the title and description. Two tags need more care:

  • Canonical: put it in the HTML. Google says that if JavaScript sets it, it must match the value in the original HTML, and there must be only one.
  • Noindex: never ship it in the starting HTML of a page you want found and plan to remove it with JavaScript later. Google's guide warns: "When Google encounters the noindex tag, it may skip rendering and JavaScript execution."

For link previews on Facebook, LinkedIn or text messages, add Open Graph tags (`og:title`, `og:description`, `og:image`, `og:url`) to each URL. Meta's guide says: "To see how your markup appears to the Facebook Crawler enter a URL into Sharing Debugger." If every shared link shows your homepage title, your tags are set only by JavaScript or only once.

Structured data (schema markup) can also come from JavaScript: Google says you can generate the JSON-LD and inject it into the page, then test it. The Rich Results Test shows whether Google sees it.

What about missing pages and soft 404s?

An SPA often answers every address, even a mistyped one, with the "200 OK" code, then shows "page not found" with JavaScript. Google calls that a soft 404 (an error page that claims to be fine). Google's JavaScript guide gives two fixes for client-side apps:

  1. Redirect with JavaScript to a URL where the server returns a real 404 code, such as `/not-found`.
  2. Add a `noindex` robots meta tag to the error view with JavaScript.

Do speed, lazy loading and crawl budget matter?

Speed matters to visitors; crawl budget almost never matters to a small business. Google's crawl budget guide is written for sites with "1 million+ unique pages" or "10,000+ unique pages" that change daily. A 30-page service site is far below that.

Lazy loading (loading images only as you scroll) is fine if it follows Google's guide: load content "whenever it is visible in the viewport," using the browser's built-in lazy loading or the IntersectionObserver API. Don't lazy-load what shows on first screen. Google publishes no fixed number of seconds it waits for your JavaScript; the real risk is code that errors or waits for a click. For speed and rankings, see Core Web Vitals.

Does GA4 track page views in an SPA?

Usually yes, without code. GA4's enhanced measurement sends a page view when the page loads "or the browser history state is changed by the active site," and its help page says the option "listens for pushState, popState, and replaceState." That only works if each view changes the URL, which is one more reason to fix routing. To track calls and forms, see GA4 key events.

Example

Illustrative cases with invented numbers.

A Vue booking site for a cleaning company (US dollars)

Search Console shows 1 indexed page out of 12, and every address starts with `/#/`. The developer switches the router to History mode, adds a sitemap and sets a title per page. Moving the 12 public pages to Nuxt pre-rendering puts the text in the HTML for AI crawlers too. Quoted cost: $1,500 to $3,000.

A React app for a physiotherapy clinic in Toronto (Canadian dollars)

The site was built with Create React App. View source shows an empty page shell with no text. Rebuilding the public pages in Next.js was quoted at C$4,000; the patient portal stays a plain SPA behind the login, since it doesn't need search.

An owner-built Lovable site from early 2026

It predates the May 2026 switch, so crawlers get a pre-rendered copy. URL Inspection shows the full text; the owner checks that each service has its own URL and title, then submits the sitemap.

FAQ

Is an SPA bad for SEO?

Not by itself. A client-only SPA is risky for pages you need found; the same app with server rendering or pre-rendering indexes like any site.

Do I need to rebuild my whole app?

Usually not. Render the public pages (home, services, prices, contact) on the server or at build time. Logged-in areas can stay client-side; they shouldn't be in search anyway.

Is prerender.io or a similar service safe?

It's dynamic rendering. Google accepts it if bots and people see similar content, but calls it a workaround, not a long-term fix.

Does Bing render JavaScript?

In 2018, Bing wrote that its crawler "is generally able to render JavaScript" (Bing Webmaster Blog), but Google's own guide warns other engines may ignore it. Serving HTML removes the question for every crawler.

Different for you?

Keep learning

NextNoindex check: how to see if a page is noindexedFour ways to check one page for noindex: page source, response headers, a browser extension and Google's URL Inspection. What each one catches and misses.

Do it yourself

Crawlability checklist: make every page reachable by GoogleA crawlability checklist for a small business site: find orphan pages, robots.txt blocks, broken links, redirect chains and server errors, with free tools.

Ask us one question

One line is enough. We reply by email.

Sources

  1. Google Search Central: Understand the JavaScript SEO basics
  2. Google Search Central: Fix search-related JavaScript problems
  3. Google Search Central: Dynamic rendering as a workaround
  4. Google Search Central: Fix lazy-loaded website content
  5. Google Crawling Infrastructure: Crawl budget management
  6. Bing Webmaster Blog: JavaScript, dynamic rendering, and cloaking (October 2018)
  7. Vercel: The rise of the AI crawler (December 2024)
  8. React: Creating a React App
  9. React Blog: Sunsetting Create React App
  10. Next.js Docs: Metadata and OG images
  11. Vue.js: Server-Side Rendering (SSR)
  12. Nuxt Docs: Rendering modes
  13. Nuxt Docs: SEO and meta
  14. Angular: Server and hybrid rendering
  15. Angular Universal repository (archived)
  16. Angular API: Meta
  17. Lovable Docs: Optimize your app for SEO and AI search
  18. Meta for Developers: A guide to sharing for webmasters
  19. Google Analytics Help: Enhanced measurement events