Skip to content

Deploy a Static Website

Host HTML, CSS, JavaScript, and static-site generator bundles on Hosted EZ with zero-PHP nginx serving, versioned archive deploys, and 1-click atomic rollbacks.

Updated View as Markdown

Hosted EZ’s Static Site runtime serves files directly from nginx over HTTP/2 and HTTP/3 with Brotli and gzip compression, TLS 1.3, automatic HTTPS, and zero PHP overhead. Hidden dotfiles (except /.well-known/acme-challenge/) and *.php requests return 404 automatically.

Deploy a static archive and roll backWalkthrough
Create a Static Site, upload a .zip bundle in the Deployments tab, and roll back atomically to a previous release.

Create a Static Site

Choose Static Site in the New Site wizard

Open Sites → New site in app.hostedez.com, select Static Site, and continue to Step 2.

Configure static delivery options

Enter a site name and configure initial routing defaults (you can change these anytime in Routing → Static Delivery):

  • SPA fallback: enable for client-side routers (React Router, Vue Router, TanStack Router) so unmatched paths serve /index.html.
  • Clean URLs: enable for static site generators (Astro, Next.js static export, Hugo) so /about resolves /about.html cleanly.
Step 2 of the Create Site modal configuring a Static Site with SPA fallback and Clean URLsStep 2 of the Create Site modal configuring a Static Site with SPA fallback and Clean URLs

Package your build output

Build your site locally and archive the output directory into a .zip, .tar.gz, or .tgz file:

# Example: bundle dist/ into dist.zip
zip -r dist.zip dist/
# Example: bundle dist/ into dist.tar.gz
tar -czf dist.tar.gz -C dist .

Upload and deploy

Open your site’s Deployments tab, drag and drop your archive onto the upload zone, add an optional release note (up to 500 characters), and click Deploy.

Hosted EZ Static Site Deployments tab showing the archive upload dropzone and versioned releases tableHosted EZ Static Site Deployments tab showing the archive upload dropzone and versioned releases table

How atomic deploys & rollbacks work

When you upload a release archive:

  1. Hosted EZ extracts and validates the archive in an isolated staging directory—your live site keeps serving the previous release throughout upload and extraction.
  2. Permissions are normalized and an immutable .tar.gz release snapshot is persisted for rollback.
  3. Hosted EZ swaps public_html atomically in one filesystem operation—zero half-deployed files and zero downtime.
  4. If Global Edge CDN is enabled on the site, Hosted EZ automatically purges the edge cache as part of the deploy.
  5. Up to 10 release snapshots are retained on disk per static site.

To revert to a previous release, open the Deployments tab, click Rollback on any retained version, optionally enter a rollback note, and confirm. Rollbacks swap public_html atomically, record a new version entry pointing to the restored snapshot, and purge the Global Edge CDN automatically.

Archive limits & security rules

Rule Limit / Behavior
Supported formats .zip, .tar.gz, .tgz
Max uploaded archive size 100 MiB
Max extracted size 512 MiB (also capped by your account SSD storage quota)
Max regular files per deploy 20,000 files
Retained rollback releases 10 most recent releases
Forbidden archive entries Symlinks, hardlinks, absolute paths, .. traversal, Windows backslashes (\), device/FIFO/socket entries
Auto-ignored entries __MACOSX/ trees and .DS_Store files
Default directory index index.html (directory listing is disabled)

Default caching behavior

Out of the box, nginx sets sensible Cache-Control headers on static sites:

  • Static assets (.css, .js, .mjs, .svg, .png, .jpg, .jpeg, .gif, .webp, .avif, .ico, .woff, .woff2, .ttf, .otf, .eot, .map): public, max-age=604800 (7 days).
  • HTML & other documents: no-cache, must-revalidate so browsers always pick up new deployments immediately.
  • Password-protected paths: private, no-store to prevent shared caches from storing private content.

To set public, max-age=31536000, immutable on hashed asset folders (like /assets or /_astro), add a Custom Response Header rule in Routing → Static Delivery. See SPA Routing, Clean URLs & Custom Headers.

Alternative deployment methods

  • Automated CI/CD: Deploy on every push to main from GitHub Actions using SFTP and SSH public keys. See SFTP & GitHub Actions CI/CD.
  • Quick single-file edits: Edit index.html, robots.txt, or sitemap.xml directly in the dashboard using the File Manager.
  • AI Agents: Deploy static bundles and inspect releases programmatically via the Hosted EZ MCP Server.

Framework guides

Navigation

Type to search…

↑↓ navigate↵ selectEsc close