Article

Static vs dynamic websites: the difference, and which to choose

A static website is a set of ready-made files that are sent to every visitor exactly as they are; a dynamic website builds each page when it’s requested, usually from a database. Static sites are faster, cheaper and simpler to look after; dynamic sites are needed when pages change per visitor or content changes constantly.

By Lumiave · · 7 min read

In short

A static site is pre-built files served the same to everyone. A dynamic site runs code on a server to build pages on request, often pulling from a database. For most brochure sites, portfolios, landing pages and small-business sites, static is simpler, faster and cheaper to keep. Choose dynamic when visitors log in, content changes all day, or each person needs to see something different.

What a static website is

A static website is a folder of files: HTML pages, stylesheets, scripts and images. When someone visits a page, the host finds the matching file and sends it. Nothing is worked out at the moment of the visit. Everyone who opens the “About” page gets the same file.

“Static” doesn’t mean the site can’t move or respond. Static pages can have menus that open, galleries, animations, embedded maps and videos, and forms that send to a separate form service. What they don’t do is change their content on the server for each visitor.

Static sites are written by hand, exported from a design tool, or produced by a static site generator: a program that takes templates and content and outputs plain files, which are then published.

What a dynamic website is

A dynamic website runs code on a server every time a page is requested. That code reads from a database, checks who the visitor is, and assembles the page on the spot. The “My account” page shows your orders, not someone else’s, because it was built for you a moment ago.

Content management systems, online shops, membership sites, booking systems, forums and web applications are dynamic. So are many sites that look simple but were built on a dynamic platform out of habit.

The difference in one line

Static: the page is made once, before anyone visits. Dynamic: the page is made each time someone visits.

Pros and cons of static websites

Advantages:

  • Fast. The host just sends a file; there’s no code to run or database to query first.
  • Cheap to host. Plain files can be served from simple, inexpensive hosting, and they handle sudden traffic well.
  • Fewer things to break. No database, no server-side code, no plugins to update. There’s far less to attack and less to maintain.
  • Easy to back up and move. The whole site is a folder. Copy it, zip it, publish it somewhere else.
  • Easy to keep history. Because it’s files, every version can be kept and compared.

Disadvantages:

  • No per-visitor content on the server, such as accounts, carts or dashboards.
  • Editing needs a workflow. Without an admin area, someone edits the files (or the source content) and publishes again.
  • Very large, fast-changing sites can be slow to rebuild if every change means regenerating thousands of pages.

Pros and cons of dynamic websites

Advantages:

  • Content changes instantly for everyone, with no republishing step.
  • Personalisation: logins, accounts, saved carts, members-only pages.
  • Non-technical editing through an admin area, which suits teams publishing every day.
  • Features built in or added by plugin: shops, bookings, search over large catalogues.

Disadvantages:

  • More upkeep. The platform, its plugins and the server software need regular updates, and an out-of-date site is a common target for attacks.
  • Slower by default. Building pages on request takes time unless caching is set up well.
  • More can go wrong. A database problem or a bad plugin update can take the whole site offline.
  • Harder to back up and move. You need the files and the database, kept in step. See how to back up a website.
  • Hosting usually costs more than plain file hosting.

Examples of each kind of site

Usually a good fit for static:

  • a café, salon or tradesperson’s site with services, hours and a contact page,
  • a portfolio or personal site,
  • a product or event landing page,
  • documentation and help pages,
  • a small blog that publishes a few times a month,
  • a company brochure site that changes a few times a year.

Usually needs dynamic:

  • an online shop with stock, carts and checkout,
  • a membership or course site with logins,
  • a booking or ordering system,
  • a news site publishing many times a day with a team of editors,
  • anything with user accounts, comments or a personal dashboard.

The middle ground

The line isn’t as sharp as it used to be. Many sites mix the two:

  • A static site with services added: a form service for enquiries, an embedded booking widget, a hosted checkout button. The pages stay static; the dynamic parts are borrowed.
  • A CMS that publishes static files: editors use an admin area, and the system outputs plain pages for visitors.
  • A static marketing site beside a dynamic app: the homepage and pricing pages are static, the logged-in product is dynamic.

For small businesses, the first option often gives the best of both: a fast, low-maintenance site that still takes bookings and enquiries.

How to choose

Ask these questions about the project:

  1. Do visitors need to log in or see something personal? If yes, you need something dynamic, at least for that part.
  2. How often does the content change, and who changes it? A few times a month by you or a freelancer suits static. Several times a day by a team of non-technical editors leans dynamic.
  3. Do you need a full shop? A few products can be sold with a hosted checkout from a static site; a large catalogue with stock management needs a shop platform.
  4. Who will maintain it? A dynamic site needs regular updates for years. If nobody will do that, static is safer.
  5. What’s the budget for hosting and upkeep? Static is usually cheaper on both counts.

If you answered “no” to the first and third questions, a static site is very likely the better choice.

Moving from dynamic to static

Many small sites run on a dynamic platform they don’t need. If the content changes rarely and there are no logins or shop, it can be worth converting: export or rebuild the pages as files, set up redirects for any changed addresses, and publish. Treat it like any move and follow a checklist, such as our website migration checklist.

Questions to ask before you start a project

Before choosing, it helps to write down a few practical answers with the client:

  • Who will edit the site day to day, and how comfortable are they with technical tools?
  • How many pages will there be now, and in a year?
  • Which features are essential at launch, and which are “nice to have later”?
  • Who will keep the platform updated, and is that in the budget?

The answers often make the choice obvious. A site edited twice a year by a freelancer, with ten pages and a contact form, has very different needs from a site edited daily by five staff with a growing catalogue. Whichever you choose, keep the site’s content portable, so a later move is a project rather than a rebuild.

Where Devdwell fits

Devdwell works with a website as files on your computer, so it’s a natural home for static sites and sites exported as files. You can import an existing site from a folder or zip, change it by describing what you want or clicking the part you mean, and publish to a private staging link or the live address with one button. It doesn’t include a CMS or an online shop, so if a project needs those, a dynamic platform is the right tool. See how it compares in Devdwell vs WordPress.

Questions

Is a static website better for SEO?

Not automatically, but static sites tend to load quickly and have clean, simple pages, which helps. Search engines read static and dynamic pages the same way; what matters is useful content, sensible structure and a fast, mobile-friendly site.

Can a static website have a contact form?

Yes. The page itself stays static and the form sends its data to a separate form service or a small script elsewhere, which then emails you. Booking and payment widgets work the same way.

Is WordPress static or dynamic?

WordPress is dynamic by default: it builds pages from a database each time they are requested, usually with caching to speed that up. There are ways to export a WordPress site as static files if it doesn’t need dynamic features.

Are static websites more secure?

Generally, yes. With no database or server-side code running on each visit, there are far fewer things to attack or keep updated. The accounts around the site, like hosting and domain logins, still need strong passwords.

Bring all your sites home.

Devdwell is in early access for Mac and Windows, with the web app for everywhere else. Tell us a little about how you build and we’ll be in touch.