Static vs Dynamic Website Hosting: Which Do You Need?
Static vs dynamic website hosting explained: cost, speed, security and scaling compared, how static sites add forms and logins, and when you need a server.
6 min read

Static website hosting serves prebuilt files, the same HTML, CSS and JavaScript for every visitor, with no code running on the server. Dynamic hosting runs code such as PHP, Node.js or Python on each request, usually with a database. Static is cheaper, faster and more secure, and often free; you only need dynamic hosting when pages must be generated per request on a server.
This explainer compares the two, shows how static sites add dynamic features like forms and logins, and helps you decide if you really need a server. If static sounds right, our guide to free static website hosting compares the free options.
Limits checked 14 October 2026 against each provider's official docs. Free plans change often; check the linked pages before you commit.
What is static hosting?
A static site is a folder of files. You build it once, by hand or with a static site generator such as Hugo, Eleventy, Astro or Jekyll, and upload the output. When a browser asks for a page, the host sends the matching file. Nothing is computed.
Because the files don't change between requests, they can be copied to servers around the world and served from whichever is closest to the visitor. That's why static hosts are fast and why they can afford generous free plans.
What is dynamic hosting?
A dynamic site builds each response on demand. A request arrives, code runs (a WordPress PHP script, a Django view, an Express route), the code reads from a database, and the server assembles HTML to send back.
That makes it possible to show different content to different people, process data and store it, but it means a server has to be running, patched and scaled for every request.
Static vs dynamic website hosting compared
| Static hosting | Dynamic hosting | |
|---|---|---|
| Cost | Often free; cheap at scale | Usually paid; server or managed platform fees |
| Speed | Very fast; files served from a CDN | Depends on code, database and caching |
| Security | Small attack surface; no server code to exploit | Server, runtime, database and plugins all need patching |
| Scaling | Handles spikes easily | Needs capacity planning, caching or autoscaling |
| Maintenance | Rebuild and redeploy on change | Ongoing updates, backups and monitoring |
| Personalised pages | Only in the browser with JavaScript | Yes, per request |
| Processing forms | Needs a form backend or function | Built into the app |
| User accounts | Via a third-party auth service | Built into the app |
| Database | External service via APIs | Directly on or next to the server |
The trade-off is simple: static hosting is better at serving pages, dynamic hosting is better at running logic. Most marketing sites, blogs, portfolios and documentation are mainly about serving pages.
How static sites add dynamic features
Static doesn't mean frozen. Modern static sites add interactivity by calling services from the browser or running small pieces of code at the edge, an approach often called Jamstack. Our Jamstack forms post covers it in more depth.
Forms through a form backend
A static host can't receive a form POST, because there's no code on the server to handle it. The standard fix is to point the form's action at a hosted form backend, which accepts the submission, filters spam and emails it to you. Netlify is the exception among the big hosts: Netlify Forms handles submissions for sites deployed there. See static website forms for all the options.
<form action="https://formsubmit.app/f/YOUR_FORM_ID" method="POST">
<input type="email" name="email" required>
<textarea name="message" required></textarea>
<button type="submit">Send</button>
</form>Serverless functions
Netlify, Vercel and Cloudflare let you deploy small functions next to your static files. They run only when called, so you can add an API endpoint, a payment webhook or a search proxy without running a server. Free allowances are limited: for example, Vercel Hobby includes 1 million function invocations a month, and Cloudflare's Workers Free allowance is 100,000 requests a day. GitHub Pages has no functions at all.
Third-party embeds and APIs
Comments, search, analytics, maps, video, payments, booking calendars and authentication can all be added with a script tag or an API call. Each one is somebody else's dynamic backend, plugged into your static page.
Build-time data
Content from a headless CMS or a spreadsheet can be pulled in when the site builds, so pages are static but easy to edit. Rebuilding on a schedule or on content change keeps them fresh.
Do I need dynamic hosting?
Probably not, if your site is mostly content. Use this checklist.
| You need... | Static hosting works? | How |
|---|---|---|
| A contact or signup form | Yes | Form backend, or Netlify Forms on Netlify |
| A blog or documentation | Yes | Static site generator |
| Search | Yes | Client-side index or hosted search API |
| Payments | Usually | Hosted checkout links or a serverless function |
| User logins | Usually | Third-party auth plus functions |
| Content edited by non-developers | Usually | Headless CMS with rebuilds |
| Heavy database writes and complex queries | Not really | Dynamic app server |
| Long-running background jobs | No | Dynamic hosting or a job service |
| Server-rendered CMS like WordPress | No | PHP hosting, or export to static |
You truly need dynamic hosting when the core of the product is server-side logic: a web app where users create and edit data all day, an internal tool built on a traditional framework, software that must run on a server you control, or a CMS that renders pages per request. Even then, many teams keep the marketing site static and host only the app dynamically.
Example: moving a small business site from dynamic to static
Picture a five-page site for a local business running on a CMS with shared PHP hosting: home, services, about, a gallery and a contact page. The content changes a few times a year, but the server, the CMS and its plugins need updates every month.
Rebuilt as a static site, the pages become plain HTML generated by a static site generator, the gallery images are optimised at build time, and the contact form posts to a form backend. The site moves to a free static host with a custom domain and free HTTPS, as covered in our guide to free custom domains and HTTPS.
The result is usually faster, with nothing left to patch. The trade-off is editing: changes now go through a Git commit or a headless CMS, rather than a familiar admin screen.
Is static hosting better for SEO?
Search engines don't rank a page higher because it's static, but static hosting helps with the things that do matter. Pages arrive as complete HTML, so crawlers see the content without running JavaScript. Files served from a CDN load quickly, which helps Core Web Vitals. And there's less to break: no database outage can serve a blank page to Googlebot.
Dynamic sites can match all of this with good caching and server rendering. It just takes more work to get there, and more work to keep it that way as plugins and dependencies change.
Picking a static host
If static fits, the four main free hosts each have a catch worth knowing. Vercel Hobby is non-commercial only, GitHub Pages isn't for running an online business, Netlify's credit-based Free plan pauses every site at 300 credits a month, and Cloudflare Pages has unlimited static requests but steers new projects towards Workers. Compare them in Netlify vs Vercel vs Cloudflare Pages, and check the licence rules in can I use free hosting for a commercial site.
Add a working contact form to your static site
A contact form is the most common reason people think they need dynamic hosting, and it's the easiest to solve without one. Static hosts serve files and can't process form POSTs (Netlify Forms on Netlify is the exception), so point your form's action at a FormSubmit endpoint and submissions arrive by email. The free plan includes 1 form and 50 submissions a month. Create an email form or follow the HTML contact form guide.


