Skip to content
FormSubmit
Static hosting

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.

FormSubmit Team

6 min read

Diagram comparing a static host serving prebuilt files with a dynamic server generating pages per request

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 hostingDynamic hosting
CostOften free; cheap at scaleUsually paid; server or managed platform fees
SpeedVery fast; files served from a CDNDepends on code, database and caching
SecuritySmall attack surface; no server code to exploitServer, runtime, database and plugins all need patching
ScalingHandles spikes easilyNeeds capacity planning, caching or autoscaling
MaintenanceRebuild and redeploy on changeOngoing updates, backups and monitoring
Personalised pagesOnly in the browser with JavaScriptYes, per request
Processing formsNeeds a form backend or functionBuilt into the app
User accountsVia a third-party auth serviceBuilt into the app
DatabaseExternal service via APIsDirectly 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.

html
<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 formYesForm backend, or Netlify Forms on Netlify
A blog or documentationYesStatic site generator
SearchYesClient-side index or hosted search API
PaymentsUsuallyHosted checkout links or a serverless function
User loginsUsuallyThird-party auth plus functions
Content edited by non-developersUsuallyHeadless CMS with rebuilds
Heavy database writes and complex queriesNot reallyDynamic app server
Long-running background jobsNoDynamic hosting or a job service
Server-rendered CMS like WordPressNoPHP 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.

Frequently asked questions

What is static hosting?

Static hosting serves files exactly as they were uploaded: HTML, CSS, JavaScript, images and fonts. There's no server-side code running per request, which makes it cheap, fast and easy to secure. GitHub Pages, Netlify, Vercel and Cloudflare Pages all offer free static hosting.

What is the difference between static and dynamic hosting?

A static host returns prebuilt files, so every visitor gets the same file. A dynamic host runs code, such as PHP, Node.js or Python, to build a response for each request, often reading from a database. Dynamic hosting can personalise pages and process data, but costs more to run and secure.

Do I need dynamic hosting for a contact form?

No. A static site can post its form to a hosted form backend, which receives the submission and emails it to you. Netlify also has built-in forms for sites it hosts.

Can a static website have a login?

Yes, with a third-party authentication service or serverless functions. The pages are still static files, and the login and user data are handled by an external service.

Is static hosting free?

Often, yes. GitHub Pages, Netlify, Vercel and Cloudflare Pages all have free plans, each with different limits and rules. Vercel's Hobby plan is non-commercial only, and GitHub Pages isn't for running an online business.

When do I really need dynamic hosting?

When every request needs server-side logic you can't move to a service or function: a database-driven app with heavy writes, long-running background processes, a CMS like WordPress that renders on the server, or software that must run on a server you control.

Keep reading

Your form backend is 60 seconds away

Sign up with Google or email, create a form, paste the endpoint. Free forever for small sites — no credit card.