The static versus dynamic question sounds technical and is really a business decision about cost, speed and risk.

What each means

A static site consists of HTML, CSS, JavaScript and images sitting on a server. A request arrives, the server hands over the matching file. No database query, no code execution, no page assembly.

A dynamic site builds each page when it is requested. The server runs code, queries a database, assembles HTML and sends it back.

The common misconception is that static means unchanging. It does not. Static means pages are built when content changes rather than on every visit. A static blog with daily posts is still static — it rebuilds when you publish.

Why static has become the default

Speed

There is no faster way to serve a page than handing over a file that already exists. No database query, no template rendering, no server-side work at all. The gap is most visible on the slow connections and modest hardware a lot of your visitors actually have.

Cost

Static files can be served from almost anything. Shared hosting, a CDN, object storage. No application server, no database server, no scaling configuration.

For a marketing site this frequently means hosting costs measured in single-digit dollars, against a comparable dynamic setup costing considerably more.

Security

A static site has almost no attack surface. There is no database to inject into, no application code executing, no plugin with a vulnerability. The file either gets served or it does not.

This matters more than people expect — a large share of small-business site compromises come from unpatched dynamic platforms.

Reliability

Nothing to crash. A traffic spike that would overwhelm an application server is handled trivially, because serving files is cheap.

When you genuinely need dynamic

Personalised content. Anything differing per visitor — a logged-in dashboard, a user account, a cart reflecting that person's items.

Real-time data. Stock levels, live availability, prices changing by the minute.

User-generated content at volume. Comments, reviews, uploads that appear immediately.

Complex search. Faceted search over a large dataset.

Transactions. Checkout, payments, booking that must reserve capacity atomically.

Each of these needs server-side logic at request time, and no amount of build-time generation substitutes for it.

The practical answer: both

Modern frameworks let you choose per route, and that is what a well-architected site does.

A typical business site:

  • Homepage, services, about, blog — static. Identical for every visitor, so build once.
  • Search results — server rendered, because the query varies.
  • Customer dashboard — client rendered behind authentication, where SEO is irrelevant.

Choosing per route rather than per project is the single clearest marker of a well-built modern site. Making everything dynamic because one page needs to be is a common and expensive mistake.

What about a CMS?

A frequent objection: "we need to edit content, so we need a dynamic site."

Not true. A static site works perfectly with a CMS. The editor updates content, the CMS triggers a rebuild, the new pages deploy — usually within a minute or two.

The client gets the same editing experience. The visitor gets a static page. This is how most modern content sites work.

The only time this breaks down is when content must appear instantly — breaking news, live inventory. For a business website, a one-minute rebuild is invisible.

What about forms?

Another common objection, and also solvable. A static site can:

  • Post to a form service
  • Post to a serverless function
  • Post to a small server-side script on the same host — a single PHP file on shared hosting handles this perfectly well

One endpoint accepting a form post does not make the whole site dynamic. This site is a static export with exactly that arrangement.

The honest trade-offs

Static costs you:

  • A build step, which takes time on very large sites
  • A delay between publishing and the page appearing
  • Some complexity in handling genuinely dynamic bits

Dynamic costs you:

  • Hosting that scales with traffic
  • A server to patch, monitor and keep running
  • A larger attack surface
  • Slower responses unless you cache aggressively — at which point you are approximating static anyway

That last point is worth noticing. Heavily cached dynamic sites are reinventing static generation with more moving parts.

Which should you choose?

Static if the site is primarily content: a business website, a brochure site, a blog, documentation, a portfolio, a marketing campaign.

Dynamic if the core of the product requires per-request logic: a web application, a marketplace, a large store with live inventory, anything behind a login.

Both for most real projects, with the choice made per route.

For a business website — which is what most of these questions are about — static is almost always correct, and the advantages in speed, cost and security are not marginal.

If you are deciding on an architecture and want a view on which routes need what, tell us what the site has to do.