A Folder of HTML/CSS Goes Anywhere
Deployment
A static HTML/CSS site is just files. Pick a host, push, done.
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
| Host | Approach |
|---|---|
| Netlify | Drag-and-drop your folder, or connect a GitHub repo |
| Vercel | Connect GitHub; auto-deploys on push |
| Cloudflare Pages | Connect GitHub; very fast edge network |
| GitHub Pages | Free for public repos. Push to gh-pages branch or use Actions |
| Surge.sh | Tiny 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:
- Point your domain’s DNS to the host (they show the records)
- Add the domain in the host’s UI
- 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 →