[Atomic Glue](atomicglue.co)
WEB DEVELOPMENT
Home › Glossary › Web Development· 396 ·

Static Site Generation (SSG)

\ˌɛs ɛs ˈdʒiː\abbr.
Filed underWeb DevelopmentPerformanceArchitecture
In brief · quick answer

Static Site Generation (SSG) pre-builds HTML pages at compile time, producing a set of static files that can be served from a CDN with no server-side processing per request.

§ 1 Definition

SSG is the fastest way to deliver content on the web. Instead of generating HTML on each request (like SSR) or in the browser (like CSR), SSG generates HTML once at build time. The result is a folder of static HTML, CSS, and JS files that can be deployed to a CDN or any static file server. No server-side application code runs at request time. This means instant page loads, zero server costs, and no database queries per visitor. Popular SSG tools include Astro, Hugo, 11ty, Next.js (static export), Nuxt (static generation), and Gatsby. SSG is ideal for blogs, marketing sites, documentation, and any site where content changes are infrequent and predictable. The tradeoff: build time increases with content size, and dynamic or user-specific content requires either client-side JavaScript or a hybrid approach with SSR.

§ 2 How it works

At build time, the SSG reads content from Markdown files, a headless CMS, or an API. It runs your templates/components to generate HTML for every page or post. The output is a folder structure matching your site's URL paths. You deploy this folder to a CDN or static host (Netlify, Vercel, Cloudflare Pages, S3). When a user requests a page, the CDN serves the pre-built HTML file directly, often from edge cache.

§ 3 Incremental Static Regeneration (ISR)

A hybrid approach popularized by Next.js: generate pages statically at build time, but re-generate individual pages on-demand or on a schedule without rebuilding the entire site. This solves the "build time problem" for large sites with frequently updated content. ISR combines the speed of SSG with the freshness of SSR.

§ 4 Common misconception

SSG sites are not "just static brochures." An SSG site can have dynamic features through client-side JavaScript: search, comments, interactive forms, live data, and personalized content. The difference is that the initial page rendering comes from pre-built HTML, not server-generated or client-generated HTML. Also, you can update content without rebuilding the entire site if your SSG supports partial builds or ISR.

§ 5 Note

SSG combined with a headless CMS (Contentful, Sanity, Strapi) gives content editors a familiar editing experience while delivering the performance of static files. Webhook-triggered rebuilds keep the site current when content changes.

§ 6 Common questions

Q. Is SSG better than SSR?
A. For performance, yes, because files are served from CDN cache. But SSG requires a build step for content changes. SSR is better for dynamically personalized content.
Q. Can SSG handle dynamic content?
A. Yes. You can load dynamic content client-side with JavaScript after the initial static page loads.
Key takeaways
  • SSG pre-builds HTML at compile time for maximum performance and minimal server cost.
  • Sites are served from CDN with zero server-side processing per request.
  • Hybrid approaches like ISR combine SSG speed with content freshness.
How Atomic Glue helps

Atomic Glue builds blazing-fast static sites with modern SSG tools. Perfect for marketing sites, blogs, and documentation. See our Website Development services.

Get in touch
# Static Site Generation (SSG)

Static Site Generation (SSG) pre-builds HTML pages at compile time, producing a set of static files that can be served from a CDN with no server-side processing per request.

Category: Web Development (also: Performance, Architecture)

Author: Atomic Glue Team

## Definition

SSG is the fastest way to deliver content on the web. Instead of generating HTML on each request (like [SSR](/glossary/server-side-rendering-ssr)) or in the browser (like [CSR](/glossary/client-side-rendering-csr)), SSG generates HTML once at build time. The result is a folder of static HTML, CSS, and JS files that can be deployed to a CDN or any static file server. No server-side application code runs at request time. This means instant page loads, zero server costs, and no database queries per visitor. Popular SSG tools include Astro, Hugo, 11ty, Next.js (static export), Nuxt (static generation), and Gatsby. SSG is ideal for blogs, marketing sites, documentation, and any site where content changes are infrequent and predictable. The tradeoff: build time increases with content size, and dynamic or user-specific content requires either client-side JavaScript or a hybrid approach with SSR.

## How it works

At build time, the SSG reads content from Markdown files, a headless CMS, or an API. It runs your templates/components to generate HTML for every page or post. The output is a folder structure matching your site's URL paths. You deploy this folder to a CDN or static host (Netlify, Vercel, Cloudflare Pages, S3). When a user requests a page, the CDN serves the pre-built HTML file directly, often from edge cache.

## Incremental Static Regeneration (ISR)

A hybrid approach popularized by Next.js: generate pages statically at build time, but re-generate individual pages on-demand or on a schedule without rebuilding the entire site. This solves the "build time problem" for large sites with frequently updated content. ISR combines the speed of SSG with the freshness of SSR.

## Common misconception

SSG sites are not "just static brochures." An SSG site can have dynamic features through client-side JavaScript: search, comments, interactive forms, live data, and personalized content. The difference is that the initial page rendering comes from pre-built HTML, not server-generated or client-generated HTML. Also, you can update content without rebuilding the entire site if your SSG supports partial builds or ISR.

## Note

SSG combined with a headless CMS (Contentful, Sanity, Strapi) gives content editors a familiar editing experience while delivering the performance of static files. Webhook-triggered rebuilds keep the site current when content changes.

## Common questions

Q: Is SSG better than SSR?

A: For performance, yes, because files are served from CDN cache. But SSG requires a build step for content changes. SSR is better for dynamically personalized content.

Q: Can SSG handle dynamic content?

A: Yes. You can load dynamic content client-side with JavaScript after the initial static page loads.

## Key takeaways

## Related entries


Last updated June 2026. Permalink: atomicglue.co/glossary/static-site-generation-ssg

Schedule a call

30 min · Video call

1
Date
2
Time
3
Details