Deployment

A Folder of HTML/CSS Goes Anywhere

Deployment

A static HTML/CSS site is just files. Pick a host, push, done.

3 min read Level 1/5 #web#deployment#hosting
What you'll learn
  • Pick a host
  • Configure a custom domain
  • Test on a real device

A static HTML / CSS / JS site is just a folder of files. Any web host will serve it.

Free Static Hosts

HostApproach
NetlifyDrag-and-drop your folder, or connect a GitHub repo
VercelConnect GitHub; auto-deploys on push
Cloudflare PagesConnect GitHub; very fast edge network
GitHub PagesFree for public repos. Push to gh-pages branch or use Actions
Surge.shTiny CLI — surge ./dist mysite.surge.sh

For a first deploy, Netlify or Vercel takes about 90 seconds: sign in with GitHub, pick a repo, click Deploy.

Folder Structure

Most static hosts expect:

your-folder/
├── index.html         (served at /)
├── about.html         (served at /about)
├── styles.css
├── images/
└── 404.html           (custom 404 page)

Custom Domain

Every host has a “custom domain” setting:

  1. Point your domain’s DNS to the host (they show the records)
  2. Add the domain in the host’s UI
  3. Wait a few minutes for SSL provisioning

Cloudflare is unique — it can host the site AND manage the DNS.

HTTPS

All the hosts above provision SSL certificates automatically. The days of manually buying certs are gone.

Test On a Real Device

Before declaring victory:

  • Phone — text size, tap targets, mobile nav
  • Slow network — DevTools → Network → throttle
  • Keyboard only — unplug mouse, Tab around
  • Screen reader — VoiceOver (Cmd-F5)
  • Lighthouse — DevTools → Lighthouse, audit on mobile

The “deployment” step isn’t done until those pass.

Caching Headers

Static hosts default to sensible caching:

  • HTML — short cache (so updates show quickly)
  • CSS / JS with hashed filenames — long cache (forever, basically)
  • Images — long cache

You usually don’t need to configure anything.

Up Next

Where to go from here.

Going Further →