Static sites

Ship SPAs and static builds on the edge, with redirects, rewrites, and headers.

Static sites serve SPAs and static builds from a lightweight nginx edge with instant HTTPS — no running container to manage.

Create a site#

  1. 1

    New site

    On the Static hosting page, click “New site”.

  2. 2

    Point at a repo

    Choose a project, name the site, and select a Git repository.

  3. 3

    Set the output directory

    Enter the folder your build produces (default dist).

Framework presets#

In Settings, pick a framework preset to prefill the build command and output directory:

Vite
npm run build → dist
Next.js (static export)
npm run build → out
Create React App
npm run build → build
Astro
npm run build → dist

Redirects, rewrites & headers#

The routing editor in Settings lets you add rules that nginx applies on the next deploy:

  • Redirects — send /old to /new, optionally as a permanent 301.
  • Rewrites — serve one path under another, e.g. /api/(.*) → /proxy/$1.
  • Headers — attach response headers to a path, e.g. X-Frame-Options: DENY on /.

Your static build ships to the edge with HTTPS and your own redirect, rewrite, and header rules.