Static Hosting
What it is
Static hosting serves pre-built files — HTML, CSS, JavaScript, images — exactly as they are, with no server running your code on each request. You build your site once, upload the resulting files, and the host delivers them to visitors. It's the simplest and cheapest way to put a website online.
Strengths
- Extremely fast — files are served directly, often from a global CDN.
- Cheap or free; many hosts have generous no-cost tiers.
- Rock-solid reliability with almost nothing to break.
- Scales effortlessly to large traffic spikes.
- Very secure — no server-side code means a tiny attack surface.
Trade-offs
- No server logic on requests; dynamic behavior must come from APIs or client-side JavaScript.
- Content updates require a rebuild and redeploy.
- Not suitable on its own for user accounts, databases, or per-request logic.
- Build times grow with very large sites.
- Truly real-time features need to be bolted on with external services.
When to use it
Static hosting is ideal for marketing sites, blogs, documentation, portfolios, and the front end of single-page apps. Pair it with serverless functions or third-party APIs when you need a bit of dynamic behavior.
Vibe coding fit
This is the gentlest landing spot for AI-directed projects — the deploy is often just "push to a git branch." An agent can scaffold a static site generator (Astro, Hugo, Next.js export), wire up the build command, and configure the host so every commit auto-deploys. Tip: ask the agent to set up continuous deployment from your git repository so you never run a manual upload — you just commit, and the live site updates itself. Hosts like Cloudflare Pages, Netlify, and GitHub Pages all support this.
# netlify.toml — static site build config
[build]
command = "npm run build"
publish = "dist"
[[redirects]]
from = "/*"
to = "/index.html"
status = 200
# Deploy from the command line
npx netlify deploy --prod --dir=dist