What is a static website?
Dan Counsell · Founder of Realmac SoftwareUpdated
We’ve made RapidWeaver, a website builder for Mac, since 2004. Each guide works with any tool, then shows how in RapidWeaver Elements.
Every web page ends up as HTML in a visitor’s browser. The difference between static and dynamic sites is when that HTML gets made.
Static vs dynamic websites
A static website is built before anyone visits. Each page already exists as a file on the server, and the server sends it as it is.
A dynamic website builds pages on the fly. When someone visits, the server runs code, asks a database for the content and puts the page together. WordPress works like this.
| Static website | Dynamic website | |
|---|---|---|
| How pages are made | Built once, before publishing | Built for each visit |
| Speed | Fast, nothing to work out | Slower unless cached |
| Hosting | Any host, often the cheapest plan | Needs PHP or similar, plus a database |
| Security | Little to attack | Plugins, logins and the database all need updates |
| Changing content | Edit and publish again | Edit in a web dashboard |
| Good for | Personal, portfolio, business, event and documentation sites | Big shops, forums, membership sites |
The good parts of a static website
- Speed. The server just sends a file, so pages load quickly.
- Security. There’s no database or login page for attackers to try.
- Cost. Static files run on the cheapest hosting there is.
- Less upkeep. No plugins or server software to keep patching.
- You can move it. The files work on any host.
The limits
- No live features on their own. Comments, search across a big site or user accounts need extra services or code.
- You publish to update. Change a word and you publish again. With a desktop builder that’s one button, and only the changed files upload.
Static doesn’t mean it can’t move
“Static” is about how pages are served, not how they look. A static site can have animations, galleries, video, maps and contact forms. Most of what people call interactive happens in the browser with JavaScript, which works fine on a static site.
Is RapidWeaver Elements a static site builder?
Mostly, yes. RapidWeaver Elements builds your site on your Mac and publishes plain HTML, CSS and images. That’s why Elements sites are quick and run on almost any host.
When you need something dynamic, you add it a piece at a time. The built-in CMS keeps blog posts as Markdown files and uses PHP to show them, with no database (see flat-file CMS). Forms and the Password Protect add-on use PHP too. Everything else stays static.
Questions about static websites
Are static websites good for SEO?
Yes. They load fast, the HTML is clean, and search engines can read every page without running code. Elements also writes a sitemap.xml for you.
Can a static website have a blog?
Yes. Some static builders turn Markdown posts into HTML pages when you publish. Others, like the Elements CMS, read Markdown files on the server with PHP and need no database.
Can a static website take payments?
Yes, through a payment service. In Elements you can sell with add-ons such as PayPal or VibraCart. A large shop with stock control is better on a dedicated shop platform.
Is a static website the same as an HTML website?
Pretty much. A static site is HTML files plus the CSS, scripts and images they use. You don’t have to write the HTML yourself; a builder does it for you.