What Is Static Site Hosting?

Category: Hosting Basics ยท Updated 2026-10-30

Static site hosting serves a website made of ready-made HTML, CSS, JavaScript and media files exactly as they are stored, with no server-side code running on each request. Because there is no database or application to execute, it is simple, fast and cheap to host, often through a CDN, but it cannot generate pages per visitor without help from external services.

What counts as a static site

A static site is a set of files, usually HTML, CSS, JavaScript, images and fonts, that are already fully formed before any visitor arrives. The server's only job is to find the requested file and send it back unchanged. This is different from a dynamic site such as WordPress, where a PHP script builds the page on every request by querying a database. A static page can still include client-side interactivity through JavaScript running in the visitor's browser; "static" refers to how the server handles the request, not whether the page is lively to use.

How static site hosting works

  1. You build or write your pages ahead of time, by hand or with a static site generator.
  2. You upload the finished files to a hosting service or push them to a connected Git repository.
  3. The host stores the files and serves them directly, often from edge locations close to visitors through a built-in CDN.
  4. Every visitor gets the same file for the same URL until you publish an update.

Because there is no application runtime or database to maintain, static hosts can scale to heavy traffic cheaply and are less exposed to the server-side bugs and attacks that affect dynamic applications.

Static hosting vs. traditional dynamic hosting

Static site hostingTraditional (dynamic) hosting
Page generationPre-built, same file for every visitorBuilt per request by server-side code
DatabaseNot requiredUsually required (for example MySQL)
Typical speedVery fast, easy to cache globallyDepends on caching and server load
Dynamic features (logins, search, forms)Needs external APIs or serverless functionsBuilt in at the application layer
Hosting cost for high trafficUsually lowScales with server and database load

Building and deploying a static site

Static sites are often produced with a static site generator such as Hugo, Jekyll or Eleventy, which turns templates and content files into finished HTML during a build step. Deployment is usually a simple file sync or a Git push that triggers an automatic build and publish:

# A typical deploy flow
git add .
git commit -m "update homepage"
git push origin main
# host detects the push, runs the build, and publishes the new files

When static hosting is not enough

  • You need user accounts, logins or personalized dashboards.
  • Your content changes per visitor, such as a shopping cart or search results pulled live from a database.
  • You need a contact form that stores submissions, which typically calls an external form service or a small serverless function.
  • Editors need a content management interface instead of hand-editing files or running a build.

Many sites solve this by pairing static hosting with external APIs for the dynamic pieces, an approach commonly called the Jamstack.

Frequently asked questions

What is an example of a static site?

A documentation site, a marketing landing page, a personal portfolio or a blog built with a static site generator are common examples. The pages look the same for every visitor until the owner publishes a new version.

Is static site hosting free?

Many providers offer a free tier for small static sites, since serving unchanging files uses very little server resource. Paid plans add things like custom domains, more bandwidth, build minutes and team collaboration features.

Can a static site have a contact form?

Yes, usually by submitting the form to a third-party form-handling service or to a small serverless function, since the static files themselves cannot process and store submissions on their own.

Is a static site more secure than WordPress?

Static sites have a smaller attack surface because there is no database, server-side application code or admin login to exploit on the hosting side. Security still depends on any third-party scripts and APIs you connect to the page.

Do static sites work well for SEO?

Yes. Static pages typically load quickly and have clean, crawlable HTML, both of which search engines favor. You still need good content, titles, headings and links regardless of hosting type.

Can I add e-commerce to a static site?

Yes, through a third-party checkout service or an embedded shopping widget that handles the cart and payment outside the static files. Full server-side e-commerce platforms such as WooCommerce need dynamic hosting instead.

Related topics