A build-time rendering method where pages are pre-generated as static HTML files. Delivers maximum speed and crawlability, ideal for content that doesn't change per-user or per-request.
Static Site Generation (SSG) is a rendering approach where a build process pre-generates every page as a static HTML file before deployment. When a visitor requests a page, the server delivers a pre-built HTML file — no database queries, no server-side processing, no waiting. The result is extremely fast load times and perfect crawlability, because the HTML is complete and instantly available for any browser or crawler.
SSG is distinct from both Server-Side Rendering (where HTML is generated at request time on the server) and Client-Side Rendering (where HTML is generated in the browser via JavaScript). SSG generates HTML at build time — when the site is being deployed, not when it's being visited. This makes SSG the fastest possible architecture for content that doesn't change frequently or vary per user.
SSG is ideal for: marketing websites, blog posts, documentation sites, portfolio pages, and any content that updates infrequently. The trade-off is that any content change requires a new build and deploy — there's no dynamic server to query. For content that updates in real time (user-specific data, live inventory, real-time pricing) SSG is not appropriate on its own, but can be combined with client-side data fetching for dynamic sections while keeping the primary content static.
From an SEO and GEO perspective, SSG is excellent: every page is complete, fast-loading HTML that crawlers can instantly read. Core Web Vitals scores are typically high because there's no server computation delay. The main risk is build time at scale — sites with thousands of pages can have slow build pipelines, though tools like incremental static regeneration (ISR) in Next.js mitigate this.