Glossary · Web Development

Static Site Generation

STAT-ik syt jen-uh-RAY-shunnoun

Static site generation builds a website's pages into fixed HTML files ahead of time so they load fast and securely.

Part of speech
noun
Pronunciation
STAT-ik syt jen-uh-RAY-shun
Origin
From 'static,' Latin 'staticus' meaning standing, plus 'site generation.' The approach builds fixed HTML pages ahead of time rather than on each request.

What is Static Site Generation?

Static site generation is an approach to building websites in which every page is compiled into a fixed HTML file ahead of time, before any visitor arrives, rather than being assembled on demand for each request. When someone visits a statically generated site, the server simply hands over a pre-built file that is ready to display immediately. There is no database query, no server-side processing, and no waiting while the page is constructed. The work of building the pages happens once, during a build step, and the finished files are then served to everyone. This makes static sites exceptionally fast, secure, and inexpensive to host.

The mechanics revolve around that build step. A developer uses a static site generator, a tool that takes content, often stored in simple files or pulled from a headless content management system, along with templates that define the layout, and combines them to produce complete HTML pages for the entire site. Those files, along with the CSS and JavaScript, are then deployed to a server or a content delivery network, which distributes copies around the world so they load quickly no matter where a visitor is. When content changes, the site is rebuilt, either fully or in part, and the new files are published. Because there is no live database or server code running for each visit, there is far less that can break or be attacked.

The term contrasts with dynamic sites, which generate pages on each request. "Static" traces to the Latin staticus, meaning standing or fixed, which captures the idea that the pages are fixed at build time rather than changing per request. The approach is not new in spirit, since the earliest websites were plain HTML files, but modern static site generation revives that simplicity with sophisticated tooling that supports templates, reusable components, and integration with external content sources, giving the speed of static files with the convenience of a real content workflow.

For a business, the appeal is concrete. Speed is the headline benefit: pre-built pages served from a content delivery network load almost instantly, which improves Core Web Vitals, user experience, and search rankings that factor in performance. Security improves because there is no live database or server-side code exposed to attackers, dramatically shrinking the attack surface. Hosting is cheap and highly scalable, since serving static files is trivial even under heavy traffic, so a viral spike will not crash the site or spike costs. For content that does not change every second, such as marketing sites, blogs, documentation, and many landing pages, static generation delivers excellent results at low cost and low risk.

The main limitation is that static content is fixed until the next build, so static generation is less suited to highly dynamic, personalized, or constantly changing pages, such as a logged-in dashboard or live inventory that must be accurate to the second. For those cases, server-side rendering, which builds pages fresh on each request, or a hybrid approach may be more appropriate, and many modern frameworks let you mix strategies page by page. A common mistake is forcing every page into a static model, including ones that genuinely need real-time data, or setting up rebuilds so slowly that content updates lag. Matching the rendering strategy to how often each page's content actually changes is the key to getting the benefits without the drawbacks.

Why it matters

Static generation delivers the speed, security, and low hosting cost that improve Core Web Vitals, rankings, and conversions on content-driven sites.