All posts

Blog

What Is Jamstack? A Beginner's Guide to the Modern Web Architecture

Illustrated cover for the Developers guide "What Is Jamstack? A Beginner's Guide to the Modern Web Architecture"

Picture two ways of answering the same question. In the first, every time someone visits your page, the server looks things up in a database, assembles the HTML, and sends it back. In the second, you assemble the page once in advance, put a copy on servers around the world, and simply hand it to each visitor. The second approach is the core idea behind Jamstack.

The term was coined around 2015-2016 and popularized by people at Netlify, and it has since become a common way to describe a whole family of modern web architectures. This guide explains what Jamstack is, how the pieces fit together, and when it's a good choice for your site.

What does Jamstack stand for?

The name originally came from JavaScript, APIs, and Markup:

  • JavaScript handles dynamic behavior in the browser.
  • APIs provide data and server-side functions, whether third-party services or your own.
  • Markup means pages are pre-built as HTML, typically generated ahead of time.

Over time the community moved away from the acronym (it's often now written "Jamstack" rather than "JAMstack") and toward a broader definition: pre-render as much as possible, serve it from a CDN, and decouple the front end from back-end services. You don't strictly need JavaScript frameworks to qualify, and plenty of Jamstack sites use very little JavaScript.

How a Jamstack site works

1. Build step

A build tool takes your content (Markdown files, data from a headless CMS, product data from an API) and your templates, and generates finished HTML, CSS, and JavaScript files. Tools that do this include static site generators like Hugo, Jekyll, and Eleventy, and frameworks like Astro, Next.js, Nuxt, Gatsby, and SvelteKit, which can pre-render some or all pages.

2. Deploy to a CDN

The generated files are uploaded to a content delivery network or static host. Because the pages are just files, any server can deliver them, and a CDN can cache them close to visitors in many locations.

3. Dynamic features through APIs

Anything that can't be pre-built gets handled by APIs called from the browser or from small server-side functions:

  • Forms sent to a form-handling service or your own endpoint.
  • Search powered by a search service or a pre-built search index.
  • Comments, authentication, payments, and shopping carts through specialized providers.
  • Your own logic in serverless functions, small pieces of back-end code that run on demand without you managing a server.

4. Rebuild on change

Usually the site is connected to a Git repository. When you push a change, or when content in a headless CMS is updated and fires a webhook, the build runs again and deploys the new version automatically.

Jamstack vs a traditional dynamic site

Traditional (e.g., classic WordPress) Jamstack
When pages are built On each request (often with caching) Ahead of time, at build
What the server does for page views Runs code, queries database Serves files
Dynamic features Built into the CMS and plugins APIs and serverless functions
Content editing Built-in dashboard Markdown in Git, or a headless CMS
Deploys Upload files or update in the dashboard Git push triggers a build

It's worth noting that caching narrows the gap. A traditional site behind a full-page cache also serves mostly pre-built pages; the difference is that Jamstack makes pre-rendering the default rather than an add-on.

The benefits

Speed

Serving pre-built files from a CDN avoids database queries and server-side rendering on each request, which helps pages load quickly.

Security

With no database or application server handling public page requests, there's less for attackers to target on the public site. You still need to secure your APIs, functions, build pipeline, and any third-party accounts.

Scaling

Static files on a CDN handle traffic spikes well, because each extra visitor is just another file download. A sudden burst of traffic from a viral post is far less likely to take the site down.

Developer workflow

Everything lives in Git. Every change is versioned, many hosts create preview deployments for each branch or pull request, and rolling back means redeploying an earlier build.

Hosting simplicity

A pure static site can be hosted almost anywhere that serves files, including regular shared hosting, an object storage bucket behind a CDN, or a dedicated static hosting platform.

The drawbacks

Build times

Every content change triggers a rebuild. For a small site, that takes seconds. For sites with tens of thousands of pages, builds can get long. Modern frameworks address this with incremental builds and on-demand regeneration of individual pages, at the cost of more complexity.

Truly dynamic content is harder

Personalized dashboards, real-time inventory, and logged-in user areas don't pre-render well. You can handle them with client-side requests or server rendering, but at that point the site becomes a hybrid, and the simplicity advantage shrinks.

Editing for non-technical people

Editing Markdown files in Git isn't friendly for most content editors. A headless CMS solves this but adds another service to manage and potentially pay for.

Dependence on third-party services

Forms, search, comments, auth, and commerce often come from separate providers. Each is another account, another set of terms, and another potential monthly bill or point of failure.

Developer required

Jamstack is a developer-oriented approach. If no one on your team is comfortable with Git, build tools, and command lines, ongoing maintenance can become a bottleneck.

Good use cases

  • Marketing sites, landing pages, and company websites.
  • Documentation sites and knowledge bases.
  • Blogs and portfolios run by technical owners.
  • Event sites that need to survive traffic spikes.
  • Small to medium online stores using a headless commerce platform, with a developer to maintain them.

Less ideal use cases

  • Sites where non-technical staff need a full visual page builder.
  • Highly personalized, real-time apps.
  • Projects that depend heavily on a CMS plugin ecosystem, such as complex WordPress membership or booking setups.

Getting started

If you'd like to try it:

  1. Pick a static site generator or framework. Hugo and Eleventy are approachable for content sites; Astro is popular for content sites that want optional interactivity.
  2. Write content in Markdown and keep the project in a Git repository.
  3. Run the build locally and look at the generated output folder.
  4. Deploy those files to a static host or your existing web hosting.
  5. Add a form service or a serverless function for the first dynamic feature you need.

Starting small shows you quickly whether the workflow suits you. For background on how version control fits in, see our guide to deploying a website with Git.

Wrap-up

Jamstack is less a specific technology than a philosophy: build pages ahead of time, serve them from a CDN, and bring in dynamic features through APIs and serverless functions. It delivers speed, resilience, and a clean Git-based workflow, especially for content-focused sites with developer support. It's less suited to highly dynamic, editor-driven sites, where a traditional CMS with good caching may still be the simpler, smarter choice.

Related reading: What Is a Static Site Generator? A Beginner's Guide to Hugo, Jekyll, Eleventy and More.