Static site generator
A tool that builds a website's pages ahead of time into plain HTML files.
A static site generator takes content and templates and builds every page into HTML files before anyone visits. The files are served as they are, so there is no database or server code to run on each request.
That makes static sites fast, cheap to host and hard to attack. The trade-off is that changing content means rebuilding the site, and anything personal to a visitor needs JavaScript or a separate service. Astro, Hugo, Eleventy and Next.js in static export mode all work this way.
Key characteristics
- Pages are built ahead of time, not on each visit.
- Fast and cheap to host, often on free plans.
- No database or plugins on the live server.
- Content changes trigger a rebuild.
Example
This website is a static export: every page is built into HTML during deployment and served from a CDN, with interactive tools running in the browser.
Go deeper
Frequently asked questions
Is a static site bad for SEO?
No. Static pages are fully rendered HTML that search engines and AI crawlers read easily, and they tend to load fast.
Can a static site have forms?
Yes, through a form service or a small serverless function that receives the submissions.