Skip to content
SiteShiftCo

Static site

A website built from pre-generated HTML files served directly, without a database or server-side processing per request.

Also known as: static website, flat-file site

A static site is a website made up of pre-built HTML, CSS, and JavaScript files that are sent to the browser exactly as they’re stored. There is no database query and no server-side code execution per request, every visitor receives the same files.

How a static site works

Pages are generated ahead of time, typically during a build step that runs on a developer’s machine or a hosting provider’s build server. The output is a folder of files: index.html, about.html, contact.html, plus images, stylesheets, and scripts. That folder is uploaded to a host, which serves the files when requested.

This contrasts with a dynamic site (such as a typical WordPress installation), where the server runs code and queries a database on each request to assemble the HTML.

Performance characteristics

Static sites tend to load quickly for three reasons:

  1. No per-request server processing. The HTML is already generated.
  2. CDN compatibility. Static files cache well on edge networks (Cloudflare, Fastly, Akamai), so visitors receive the page from a geographically nearby server.
  3. Smaller payloads. Static sites typically ship less JavaScript than CMS-rendered pages.

Real-world load times depend on hosting, page weight, and image optimization. Reports from HTTPArchive and Web.dev consistently show that static-generated sites tend to score better on Largest Contentful Paint than CMS-rendered equivalents, though individual results vary widely.

Common uses

  • Marketing sites and landing pages
  • Blogs (rendered to static HTML at build time)
  • Documentation sites
  • Portfolios
  • Small-to-medium ecommerce, paired with services like Stripe, Snipcart, or Shopify Lite
  • Contact forms (via serverless functions or services like Formspree)
  • Search (via client-side libraries like Pagefind, or hosted search like Algolia)

Limitations

Static sites are not well suited to:

  • Real-time per-user content (logged-in dashboards, account pages with personal data)
  • Live data updating every few seconds (live chat threads, stock tickers)
  • Heavy user-generated content workflows (forum threading, comment moderation)

These are typically addressed by adding JavaScript that calls APIs, or by using serverless functions for the dynamic portions of the site.

Static vs dynamic sites

AspectStatic siteDynamic site (e.g. WordPress)
Page generationAt build timeOn each request
DatabaseOptional, not on the request pathRequired on the request path
Hosting costOften free or lowTypically paid hosting required
PersonalizationVia JavaScript or APIsBuilt-in via server-side code
Editor experienceVaries (Markdown, headless CMS, Git-based)Built into the platform
Plugin ecosystemSmallerLarger

Both approaches are valid for different use cases. Sites with high content velocity, many contributors, or per-user personalization needs are often a better fit for dynamic platforms.

Costs

Static sites can be hosted on free tiers from Cloudflare Pages, Netlify, or GitHub Pages, or on paid hosting at scale. There is typically no platform subscription fee separate from hosting and domain costs.

Common misconceptions

  • “Static means the site cannot change.” Pages are regenerated and republished when content changes; this typically takes seconds.
  • “Static sites cannot have a CMS.” Headless CMS platforms (Sanity, Contentful, Decap, Tina) sit alongside a static site and trigger a rebuild when content updates.
  • “Static is only for developers.” Several editing workflows exist for non-technical contributors, including web-based admin interfaces tied to a static site generator.