The best ZIP for a static host opens immediately to index.html, not to a folder containing it. Build the publish folder first, then compress its contents.

macOS Finder

  1. Open the folder that contains index.html.
  2. Select index.html and every asset folder.
  3. Right-click and choose Compress.
  4. Open the created archive once and confirm index.html is the first-level file.

Windows Explorer

  1. Open the finished publish folder.
  2. Select its contents, not the parent folder.
  3. Right-click → Send to → Compressed (zipped) folder.
  4. Open the ZIP and check that the homepage is visible immediately.

Linux terminal

cd /path/to/publish
zip -r ../my-site.zip . -x "*.DS_Store" -x "__MACOSX/*"

The trailing dot means “zip this folder’s contents.” Before upload, inspect it:

unzip -l ../my-site.zip | head -n 20

Keep the archive clean

Exclude node_modules, editor folders, .git, source maps you do not intend to publish, API keys, and .env files. For a React/Vue/Astro project, run its build command and zip the generated dist or build output—not the project source folder.