Static Site
Definition
A website where pages are pre-built files served directly to visitors. No database or server processing needed – just fast, secure HTML files.
What is a Static Site?
A static site consists of pre-built HTML, CSS, and JavaScript files. When someone visits a page, the server simply sends the ready-made file – no database queries, no processing, no delay.
Think of it like a printed brochure versus a made-to-order document. The brochure is already complete; you just hand it over.
How Static Sites Work
- Developer builds the site
- Build process generates HTML files for every page
- Files are uploaded to a server or CDN
- Visitors receive pre-built files instantly
Content changes require rebuilding the site, but modern tools automate this process.
Advantages of Static Sites
Speed
No database queries or server processing means pages load almost instantly. Static sites consistently score well on Core Web Vitals.
Security
No database to hack, no server-side code to exploit. Static sites have a tiny attack surface compared to dynamic sites.
Reliability
Fewer moving parts means fewer things to break. Static sites rarely go down.
Cost
Can be hosted for free or very cheaply on CDNs like Cloudflare, Netlify, or Vercel.
Scalability
CDNs can serve millions of visitors without breaking a sweat.
Static Site Generators
Popular tools for building static sites:
- Next.js – React-based, very powerful
- Hugo – extremely fast builds
- Gatsby – React-based with rich plugin ecosystem
- Jekyll – Ruby-based, powers GitHub Pages
- 11ty – flexible and lightweight
When Static Sites Make Sense
- Brochure websites
- Portfolios
- Documentation
- Blogs
- Marketing sites
Not ideal for sites with user accounts, real-time data, or content that changes every minute.