JavaScript & SPA hosting
Single-page apps that refresh without 404s
Host any JavaScript app that runs in the browser — with SPA fallback routing, `_redirects` and `_headers` support, and long-term caching for hashed assets.
- SPA fallback
- One switch
- _redirects
- Supported
- _headers
- Supported
- Hashed assets
- Cached 1 year
In short
StaticHero hosts client-side JavaScript applications, including single-page apps built with React, Vue, Svelte, Solid or vanilla JS. Turn on SPA mode (or include a 200.html file) and unknown routes like /dashboard/settings serve your index.html, so deep links and refreshes work. Netlify-compatible _redirects and _headers files are supported.
Updated
Client-side routing
React Router, Vue Router, TanStack Router and friends work on refresh and deep links.
Redirects & rewrites
Proxy-free rewrites (/app/* /index.html 200), splats and placeholders, just like Netlify.
Custom headers
Set CSP, CORS or caching headers per path with a _headers file.
Range requests
Large WASM, video and model files stream efficiently with byte-range support.
Example _redirects file
Place a _redirects file at the root of your upload. Rules are evaluated top to bottom; add ! to force a rule even when a file exists.
# old URLs
/blog/:slug /posts/:slug 301
/docs/* /guide/:splat 302
# single-page app fallback
/* /index.html 200What about API calls and secrets?
Your JavaScript runs in visitors’ browsers, so anything in it is public. Call APIs that are designed for browser use (with CORS enabled and publishable keys), or put a small backend elsewhere for secret keys.
For the most common backend need — collecting form data — use StaticHero Forms and skip the backend entirely.
Do you run my build command?
+
No — StaticHero hosts the built files. Run npm run build and upload the output folder. This keeps deploys instant and predictable.
Can I host a Progressive Web App?
+
Yes. Service workers, web manifests and offline caching work normally over HTTPS.
Does WebAssembly work?
+
Yes, .wasm files are served with the correct application/wasm content type.
Your site could be live in the next minute.
One site free, forever. No credit card, no setup, no servers.