What is a static site?

DEFINITION

A static site is a website made of pre-built HTML, CSS and JavaScript files that are served exactly as stored, without generating pages on the server for each visit.

A static site consists of ready-made files. When a visitor requests a page, the server or CDN simply sends the matching HTML file; there is no database query or server code running at that moment. Modern static sites are usually produced by a static site generator or a framework's static export, which takes templates and content (from Markdown files or a headless CMS) and builds every page at deploy time.

Static does not mean boring or non-interactive. Pages can include JavaScript, forms and embedded services; it only means the HTML is prepared in advance.

Why static sites matter

Because files are pre-built, they can be cached on a CDN and delivered very quickly worldwide, which helps Core Web Vitals. With no live database or server-side code on the public site, there are fewer things to attack or patch.

Hosting is often inexpensive or free, scales easily during traffic spikes, and every deploy can be version-controlled and rolled back.

When static works and when it does not

A static approach suits marketing sites, documentation, portfolios, blogs and landing pages, where content changes at the pace of editorial updates. For example, a law firm's 30-page site can rebuild in seconds whenever an editor publishes, triggered by a webhook from the CMS. Features like contact forms or search can be added through third-party services or serverless functions. Sites with thousands of frequently changing pages, user accounts or real-time inventory usually need server rendering or a hybrid approach in which only some pages are static.

Best practices

  • Connect your CMS to the host with a webhook so publishing triggers an automatic rebuild.
  • Serve the site through a CDN with long cache lifetimes for versioned assets.
  • Use serverless functions or form services for submissions instead of a full back end.
  • Keep build times short by optimizing images once and caching build output.

Common mistakes

  • Choosing static for content that must update every minute, such as live stock levels.
  • Forgetting that non-developers need a CMS or editor, not raw code, to update content.
  • Hard-coding repeated information across many pages instead of using shared data.

Frequently asked questions

Are static sites good for SEO?

Yes. Search engines receive complete HTML immediately, and pages tend to load fast, both helpful for SEO. You still need unique titles, descriptions, internal links, a sitemap and quality content. Static generation simply removes technical obstacles like slow servers or JavaScript-dependent rendering.

Can a static site have a contact form?

Yes. Many static hosts offer built-in form handling, and third-party form services or a small serverless function can receive submissions and send emails or store entries. The page itself stays static while the form posts data to an external endpoint.

What is the difference between a static and dynamic website?

A static site serves pre-built files that are the same for every visitor until the next build. A dynamic site generates pages on request, often from a database, so it can show personalized or constantly changing content. Many modern sites mix both approaches page by page.

Need help with this?

ウェブサイト制作 by VYZEON — 一瞬で表示され、検索上位を狙い、成果につながるウェブサイトを。

Fixed packages from $299. Written scope, no surprises.

See ウェブサイト制作

Related terms

More Web development terms