// Definition
SSG (Static Site Generation) is a page rendering technique in which all HTML is generated once, at the time of application build. The finished HTML files are sent to a CDN and served to users without any server-side processing.
How it works:
- You run the application build
- The framework fetches data from the CMS
- It generates a finished HTML file for each page
- The files are sent to the CDN
SSG vs other approaches:
- SSR (Server-Side Rendering) - HTML generated on the server with each request. Slower, but always up-to-date data
- CSR (Client-Side Rendering) - the browser receives empty HTML + JavaScript, which then builds the page. Worse for SEO
- ISR (Incremental Static Regeneration) - a hybrid of SSG and SSR. Pages are generated statically but rebuilt on demand after changes
Frameworks supporting SSG: Next.js, Astro, Nuxt, SvelteKit
When SSG works best:
- Blog - content changes rarely, loading speed is crucial
- Landing page - static content, maximum performance
- Documentation - occasional changes
// Why it might matter to you?
If you are building a blog, landing page, or documentation site, SSG is the easiest way to get a fast site with good SEO. Googlebot gets ready-made HTML without waiting for JavaScript. The page loads instantly because the server doesn't have to calculate anything, it just serves the file. It also usually means cheap hosting (static files on Vercel/Netlify for free) and great Core Web Vitals without configuration. The only downside: if you change the content often, each change requires rebuilding the entire application, and that's where ISR comes in.
// Related terms
// Want more actionable stuff?
Practical marketing tactics for developers. No theory, just things you can implement.
Join developers who are already reading.