Topic Web and software engineering

Single-Page or Multi-Page Application: How to Choose

The short answer

Choosing a single page application vs multi page application comes down to what the product is. Content that people find through search, such as marketing sites, blogs and stores, usually suits a multi-page app. Logged-in tools where users stay for long sessions usually suit a single-page app. Many projects mix both, with server rendering.

Written by

Siddharth Kajaria, Founder and CEO

Published

Updated

Reading time

11 min read

One long scroll unrolled across a desk beside a bound book lying open with its pages fanned.
In this post11 min read
  1. What is a single-page application?
  2. What is a multi-page application (MPA)?
  3. How do single-page and multi-page applications differ in practice?
  4. How to choose: the project traits that decide it
  5. Hybrid options: you rarely have to pick just one
  6. What does an SPA need to rank in search?
  7. Performance: what to watch in each
  8. How we’d choose the architecture for a project

Key takeaways

Whether to build a single-page application (SPA) or a multi-page application (MPA) is one of the first architecture decisions on any web project, and one of the most expensive to reverse. It shapes how fast the first page appears, how search engines see the site, how the code is organised and what the team needs to know.

There is no architecture that is better in general. There is one that fits your project better. What each one is comes first, then the project traits that should decide it, the hybrid options that let you mix them, and the SEO details a single-page application has to get right.

What is a single-page application?

A single-page application loads one HTML page once and then uses JavaScript in the browser to draw each screen and fetch data as the user moves around, without loading a new page from the server. The address bar still changes, but the browser never does a full page reload.

How it works, in practice:

  • The first request returns a small HTML shell and a JavaScript bundle.
  • The JavaScript builds the interface, asks the server’s API for data, and renders the view.
  • When the user clicks a link, a client-side router swaps the view and updates the URL using the browser’s History API.
  • From then on, only data travels between browser and server, usually as JSON.

SPAs are usually built with a front-end library or framework such as React, Vue, Angular or Svelte, talking to an API built separately.

Where they fit well: dashboards, editors, design and project tools, chat and collaboration apps, and admin panels. These are products people log into and use for long sessions, where fast, app-like movement between views matters more than the first load.

What is a multi-page application (MPA)?

A multi-page application serves a separate HTML page from the server for each URL, so every click on a link loads a new, complete page. It is how the web has always worked, and it remains the default for most content on the web.

The pages can be produced in different ways:

  • Server-rendered on each request, by a back-end framework such as Django, Ruby on Rails, Laravel or Express on Node.js.
  • Pre-built as static files, by a static site generator, and served from a CDN.
  • A mix, with most pages static and some rendered on demand.

Where they fit well: marketing sites, blogs, documentation, news and research publishing, and most online stores. These are sites people often reach from a search result or a shared link, read for a while and leave.

How do single-page and multi-page applications differ in practice?

They differ mainly in where the page is built: in the browser for an SPA, and on the server or at build time for an MPA. That one choice affects the first load, navigation, search visibility, state, offline use and how the code is organised. The table sets the two side by side, with three traits that matter either way at the end.

Single-page and multi-page applications compared, criterion by criterion
Compared onSingle-page applicationPages built in the browserMulti-page applicationPages built on the server or at build time
First loadIt has to download and run its JavaScript before it can show much, so the first load depends on the size of that bundle and the speed of the device.It sends ready-made HTML, so the browser can show content as soon as it arrives.
Moving between pagesQuick once it has loaded, because it only fetches data.A new page loads each time; with good caching and small pages this can still feel quick.
Search and sharingContent may only appear after JavaScript runs, which needs extra work to be reliably indexed and previewed (see the SEO checklist below).Content is in the HTML that crawlers and link previews receive.
StateKept in the browser between views, which makes multi-step forms, filters and live updates natural.Each page starts fresh; state lives on the server, in the URL or in cookies.
Offline useOften combined with a service worker, it can keep working with poor or no connection.Usually needs a connection for each page, unless pages are cached.
Code and teamTypically two codebases, a front end and an API, and a team comfortable with JavaScript-heavy front ends.Can be a single codebase with server-side templates, which can be simpler for content-led sites.
Hosting and running costsCan be hosted statically, but needs its API hosted somewhere.Static pages are cheap to serve from a CDN. Server-rendered pages need servers.
AccessibilityHas to manage focus and announce view changes to screen readers itself.Gets focus handling and page announcements from the browser for free.
AnalyticsPage views have to be tracked on route changes.Each page load counts by default.
Best whenPeople log in and stay for long sessions: dashboards, editors, project tools, chat and admin panelsPeople arrive from search or a shared link, read and leave: marketing sites, blogs, documentation and most stores

Neither column wins outright. Which rows matter most depends on who your visitors are and what they come to do, which is what the traits below sort out.

Public site and an app?

How to choose: the project traits that decide it

Choose by listing your project’s traits and seeing which way each one pushes. Most projects have a clear answer once the traits are written down; when they genuinely pull both ways, that is usually a sign the product should mix both.

Traits that point towards a multi-page application:

  • Most visitors arrive from search, social posts or shared links.
  • The main job is reading content: pages, articles, product listings, reports.
  • Many visitors use mid-range or older phones, or slow mobile networks, where heavy JavaScript costs the most.
  • Pages need reliable link previews and indexing from day one.
  • Content is updated by editors in a CMS rather than by users in the app.
  • The team’s strength is server-side development.

Traits that point towards a single-page application:

  • Users log in and stay for long sessions, moving between many views.
  • The interface is highly interactive: drag and drop, live editing, real-time updates, complex filters.
  • The app needs to work offline or on a poor connection after the first visit.
  • Search visibility for the app’s screens doesn’t matter, because they sit behind a login.
  • The same API will also serve a mobile app or third parties.
  • The team’s strength is front-end JavaScript development.

Hosting, accessibility and analytics matter whichever way you go; they are the last three rows of the table above. If you are also choosing the framework itself, our guide on how to choose a web framework covers that decision in more detail.

Hybrid options: you rarely have to pick just one

Modern frameworks let you mix the two: pages that arrive as complete HTML like an MPA, then behave like an SPA where it helps. For many projects, a hybrid is the right answer. These are the five common ways to do it, with the tools usually named for each.

5 hybrid options

Third-party tools, named as examples

Start from server HTML

  1. Server-side rendering with hydration

    Example tools
    Next.js (for React), Nuxt (for Vue) and SvelteKit. These usually run on Node.js, which is why the back end and the front end often share one language.
    Trade-off
    The page ships its HTML and the JavaScript that takes it over, so the bundle still needs watching, and something has to run on the server to render each page.
  2. Static generation

    Example tools
    Many of the same frameworks support it, such as Next.js, Nuxt, SvelteKit and Astro.
    Trade-off
    A content change means a rebuild, so pages that change by the minute are better rendered on demand.
  3. Islands architecture

    Example tools
    Astro is built around this idea.
    Trade-off
    It suits pages with a few interactive parts. When most of the screen is interactive, an SPA or a hydrated framework is simpler.

Keep a multi-page site

  1. Progressive enhancement of an MPA

    Example tools
    Libraries such as htmx or Hotwire’s Turbo.
    Trade-off
    Rich browser-side state, such as drag and drop or offline use, still needs more JavaScript than this approach gives you.
  2. Split by section

    Example tools
    Normal links with real URLs between the two parts, each keeping its own routing.
    Trade-off
    Two parts to keep consistent: the design, the sign-in and the links between them.

Browsers are also closing the gap from the MPA side. Cross-document view transitions let a multi-page site animate between pages, though browser support is still growing, so treat them as an enhancement rather than something the design depends on.

A single-page application needs its important content in the HTML that crawlers receive, real URLs for every view, its own title and description per page, correct status codes and normal links. Google can render JavaScript, but rendering can happen later than crawling, and not every crawler renders JavaScript at all. Check your SPA against the seven tests below.

7 tests for an SPA’s public pages

What crawlers receive

Show or hide the tests4 tests
  1. 01 Pages that must rank are rendered or prerendered

    What good looks like
    Why it matters
  2. 02 Every view has a real URL, not a hash fragment

    What good looks like
    Why it matters
  3. 03 Each route has its own title and description

    What good looks like
    Why it matters
  4. 04 Unknown paths return a real 404

    What good looks like
    Why it matters

Read next Web application development

How crawlers find pages

Show or hide the tests3 tests
  1. 05 Navigation uses real links

    What good looks like
    Why it matters
  2. 06 A sitemap lists every indexable URL

    What good looks like
    Why it matters
  3. 07 The site doesn’t rely on dynamic rendering

    What good looks like
    Why it matters

Read next How to choose a web framework

If an SPA’s pages sit behind a login, most of this matters less, because those pages shouldn’t be indexed anyway. Focus the SEO effort on the public pages around it.

Performance: what to watch in each

Each architecture has its own performance risks, and both can be fast or slow depending on how they are built.

01

In a single-page application

  • Keep the JavaScript bundle small, and split it so each view loads only the code it needs.
  • Show something useful quickly, such as the page layout, while data loads.
  • Measure on a mid-range phone on a mobile network, not only on a developer laptop.
02

In a multi-page application

  • Cache pages and assets well, ideally on a CDN.
  • Keep each page light: optimised images, little blocking JavaScript and CSS.
  • Avoid re-downloading the same heavy scripts on every page.

For a broader look at diagnosing slow pages and slow apps, see our guide to speed up a slow web app.

How we’d choose the architecture for a project

We’d start from the project’s traits, not from a favourite framework. We’d list where visitors come from, what they do on the site, which pages must rank, what devices and networks they use, whether there is a logged-in product, and what the team that will maintain it knows. Then we’d pick the simplest architecture that fits: often a multi-page or hybrid site for public pages, and a single-page app for a logged-in tool, each on its own part of the domain. Our own site is an example: tailwebs.com is a multi-page site built with Astro, because every page is public and has to rank in search, and there is no logged-in area.

If you are planning a product that needs both, our web application development service covers the build, and our page to choose a technology by project sets out the options. For server-rendered front ends and APIs, see Node.js development.

02 FAQ

Questions, answered

Can you mix SPA and MPA on one site?
Yes. Many sites serve public pages as server-rendered or static pages and load a single-page app only for a logged-in area, such as a dashboard. Each part keeps its own routing. Just make sure the links between the two parts are normal links with real URLs.
Is a React app always a single-page application?
No. React is a library for building interfaces, and the architecture depends on how it is used. A React app built with a client-side router is a single-page application. The same components can be rendered on the server per page with a framework such as Next.js, or used as interactive islands inside an otherwise static multi-page site.
Which is faster, a single-page or a multi-page application?
It depends on what you measure. A multi-page application usually shows the first page sooner, because the browser gets ready-made HTML. A single-page application usually moves between views faster once it has loaded, because it fetches only data. For content read once from a search result, the first load matters most; for tools used all day, navigation matters more.
What is islands architecture?
Islands architecture serves each page as static or server-rendered HTML and adds JavaScript only to the parts that need it, such as a search box, a chart or a booking form. Each interactive part is an island in an otherwise static page. Astro is built around it, and it suits content sites that need some interactive pieces.
Can you switch from one architecture to the other later?
Yes, but it is usually a partial rebuild, not a setting. Routing, data loading and page templates all change. The easier path is often to split the product: keep public, search-facing pages as a multi-page site and move the logged-in tool to a single-page app, or the reverse, each on its own part of the domain.