GlossaryDevelopment

Static site generation (SSG)

Also called: SSG, pre-rendering, static generation

Definition

Building every page of a website into finished HTML files ahead of time, at deploy, rather than when someone visits. The files are served from a CDN close to the visitor, which makes pages very fast, inexpensive to host and hard to attack.

How SSG works

During a build, the framework pulls content from files or a headless CMS, runs it through page templates and writes out HTML, CSS and small amounts of JavaScript. Those files are uploaded to a CDN. When someone visits, the nearest server returns a ready-made file with no database query or rendering step.

Many frameworks also support incremental regeneration, where individual pages rebuild on a schedule or when content changes, without rebuilding the whole site. That removes the old drawback of slow full rebuilds on large sites.

SSG has existed for decades in simple forms. What changed is that modern frameworks let static and dynamic pages live in the same project, so you no longer pick one approach for the whole site.

Why it matters for your website or product

Static pages are usually the fastest option, which helps Core Web Vitals and conversion. There is no live database or admin panel on the public site to exploit, which reduces the attack surface for companies in finance and insurance. Hosting is cheap and handles traffic spikes from campaigns or press coverage without strain.

The limit is personalization. A static page shows the same content to every visitor until it is rebuilt. Anything per-user, like account balances, needs server-side rendering or client-side data fetching.

How we handle it

Most marketing pages we build are statically generated, with regeneration for content that changes. Forms, calculators and booking widgets work on static pages through API routes or small interactive components. Sitemaps, schema and llms.txt are generated in the same build, so they always match the pages. See website development and our WordPress to Next.js migration guide.

Example

Imagine a fintech's site getting a sudden traffic spike after a news mention. Its statically generated pages are served from a CDN and stay fast, while the signup form posts to a separate API that scales independently. Nothing on the marketing site needs a database during the surge.

Common mistakes

  • Using SSG for pages that need per-user or real-time data.
  • Rebuilding the entire site for every small content change on a large site.
  • Forgetting that dynamic features, like forms, still need a secure backend.
  • Hard-coding content that marketers need to edit, with no CMS or editing path.

Questions, answered

Still deciding? Book a 30-minute call.

  • Yes, a static site can have forms, calculators, search and booking widgets. The page itself is pre-built, but interactive parts run in the browser and send data to APIs or serverless functions. Most of the site stays fast and simple, with dynamic features only where they are needed.

  • No, a static site is not hard to update when it is connected to a CMS or a simple content workflow. Editors change content, and the site rebuilds or regenerates the affected pages automatically, usually within a minute or two. Without that setup, every change needs a developer, which is the real problem to avoid.

Start building this week

Subscribe online in a minute, or talk it through on a call first.