Guide
What is a static website, and when to choose one.
Static or dynamic decides how fast a site is, what it costs to run and who can change it. Here is the difference in plain words.
A static website is a set of finished files (HTML, CSS, JavaScript and images) that a server hands to every visitor exactly as they are. A dynamic website is put together by a program on the server each time someone visits, usually from a database.
What is a static website
If you ask what is a static website, the shortest answer is: a website made of finished files. Each page already exists as an HTML file, next to the styles (CSS), the scripts (JavaScript), the fonts and the pictures it uses. When a visitor opens the page, the server looks up the file and sends it. Nothing is calculated, nothing is looked up in a database.
Picture a café with a printed menu. Every guest gets the same sheet, handed over the counter. That is a static site. A dynamic site is a waiter who writes each menu by hand when you sit down, checking the kitchen for what is left.
“Static” does not mean the page cannot move. Animations, sliders, video and interactive parts that run in the visitor’s browser all work.
How a dynamic website works
On a dynamic website, a program runs on the server for every visit. It reads the content from a database, fills it into a template and sends the result. WordPress works this way: the text of a page lives in a database, and PHP code builds the page when someone asks for it.
That extra step is what makes logins, shopping carts and search across thousands of products possible. It also makes a dynamic site slower to answer, dearer to run and more work to keep safe: the program needs updates and the database must stay closed to strangers.
Static vs dynamic website, side by side
The same questions, answered for both kinds of site.
| Static website | Dynamic website | |
|---|---|---|
| What the server does | Hands out finished files | Runs a program for every visit |
| Where content lives | In the HTML files | In a database |
| Speed | Fast, files can sit close to every visitor | Depends on the server and the database |
| Security | Little to attack | Code, plugins and database need updates |
| Running cost | Low | Higher, a server has to run all the time |
| Logins, shops, search | Only through an outside service | Built in |
| Client edits content | Needs an added editor | Usually built in |
Many sites mix both: a static site with a booking widget from another company, for example.
Speed, security, cost and maintenance
Speed. Because the files are finished, they can be copied to servers around the world, a so-called CDN (content delivery network), and handed out from the one nearest to each visitor.
Security. There is no login page to guess, no database to break into and no plugin with a known hole. An attacker can at most look at the same files every visitor already sees.
Cost and maintenance. Serving files takes very little computing power, so static hosting is cheap and some providers offer a free tier. And there is nothing to update every month: a static site that works today still works in five years, without security patches.
What a static site cannot do on its own
Anything that has to remember something, or that differs per visitor, needs a program running somewhere. A static site does not have one. So these need an outside service:
- A contact form: the message has to be received and sent on by a form service.
- A shop: carts, payments and stock live with a shop provider, embedded in the page.
- Logins and member areas: someone has to check passwords and keep accounts.
- Comments, bookings, newsletters: each one is a small service of its own.
Paste this into your agent.
Free until a site goes live. Then $12 a month per site, plus tax.
The old weak point: the client cannot edit
For years the main argument against static sites was the handover. The content sits inside HTML files, so changing the opening hours means opening code and uploading files again. Most clients cannot, so they email the designer. There are three ways around it.
A static site generator with a Git-based CMS. A static site generator is a tool, such as Hugo, Astro or Eleventy, that builds the finished HTML files from templates and text files. A Git-based CMS such as Decap CMS gives the client an admin panel with forms; it saves the text into the project’s repository (the folder with its full history), and the site is built again. It works well, and a developer has to set up the fields and the build.
A headless CMS. Here the content lives in a separate service with its own editor, and the site fetches it when it is built. That is the strongest option when content feeds a website, an app and more, and it is the most setup. The question of headless CMS vs static site generator is really a false choice: a headless CMS usually sits behind a generator. heyweb vs a headless CMS compares the two approaches.
An editor built into the host. The third way puts the editing where the site is hosted, so there is no extra tool to connect. That is the idea behind a static site CMS like heyweb, explained further down. All the options are laid out in how to let a client edit a static website.
When a static site is the right choice
Static fits when
- The site presents someone: a café, an architect, a studio, a portfolio
- Content changes now and then, not every minute
- Speed and low running cost matter
- You want nothing to update and patch
- Forms or bookings can come from an outside service
Dynamic fits when
- You sell many products with stock and checkout
- Visitors log in and see their own data
- Content comes from users, like posts or reviews
- Pages depend on live data, like availability
- Many editors publish many pages every day
What is static website hosting
Static website hosting is a service that stores your folder of files and hands them out under an address, with HTTPS. That is all a static site needs: no database, no server program, no PHP version to choose. You upload the folder, by dragging it into a dashboard, by connecting a Git repository, or by letting a coding agent do it, and the site is online.
Static hosts differ mostly in how a site gets there and what comes with it, such as forms, previews or editing. More on that in static site hosting.
Where heyweb fits
heyweb is static site hosting with a content editor built in. A designer builds the site, often with a coding agent such as Claude Code, Cursor or Codex, and the agent puts the folder online at an address like your-site.heyweb.page. Every version is kept in a history and can be undone. That part works today.
The client then changes texts, pictures, prices and lists by asking in a chat, and the design and the code stay untouched. The client chat is in early access, and so are a client’s own domain and support for site generators beyond plain HTML. It costs $12 per live site per month plus tax, free until a site goes live; see pricing.
heyweb is not for shops, member areas or anything that needs code running on a server. For those, a dynamic platform is the better fit. If your site was written by an AI agent, the guide on vibe-coded websites covers what to check before it goes live.
Common questions
What is a static website?
A static website is a set of finished files (HTML, CSS, JavaScript and images) that a server sends to every visitor exactly as they are. Nothing is computed for the visit, and no database is involved.
What is the difference between a static and a dynamic website?
A static website sends the same finished files to every visitor. A dynamic website runs a program on the server for each visit and builds the page, usually from a database.
What is static website hosting?
A service that stores the files of a static site and serves them under an address with HTTPS. It needs no database and no server program, which is why it is cheap and quick to set up.
Can a static website have a contact form?
Yes, through an outside form service that receives the message and sends it on to you.
Is there a static site CMS for clients?
Yes. Git-based CMSs and headless CMSs add an admin panel with forms, and some hosts build an editor in. heyweb is one of the latter: the client asks for a change in a chat, which is in early access. The options are compared in a CMS for static sites.
Headless CMS vs static site generator: which do I need?
They do different jobs. A static site generator turns templates and text into finished HTML files; a headless CMS stores the content and gives editors a place to change it. Larger sites often use both together.
Is a website built with AI static?
Often, yes. When a coding agent builds a small site, the result is usually a folder of HTML, CSS and images, which is a static site. If it added a database or server code, it is not.