> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tape.network/llms.txt
> Use this file to discover all available pages before exploring further.

# Deploy a Static Site

`tape deploy` publishes a complete static build to an existing tape. Pass the
root `index.html`; its parent directory becomes the site root.

```bash theme={null}
tape deploy ./dist/index.html
```

```text Output theme={null}
Deployed 4 files (4 uploaded, 0 unchanged)
Tape: E79y5bh5zTLq9h7SgPGRsDpcmTB1oa7YGscFFFiojy2D
URL:  https://yk5y3rg6cwclvyz7sv763kttt2d2sinpzdm3chuzw72th45s2c3a.tape.site/
```

Open and share the printed URL. The subdomain is the tape address encoded as lowercase
base32; no DNS setup is needed. With `--prefix`, the URL includes the prefix path. The CLI
uses Tapenet's `tape.site` domain by default; for another gateway, set `TAPE_SITE_DOMAIN`
or `site_domain` in the [CLI config](/tools/cli/commands/context-management) to that
gateway's site domain. `-o json` also returns the bare `subdomain_label`.

The command uploads every regular, non-hidden file below `./dist`, preserving
relative paths. That includes assets referenced indirectly through CSS,
JavaScript, manifests, workers, and runtime fetches—not only links visible in
the HTML.

`index.html` is the publication switch: all other changed files are written
successfully before it. A failed asset upload therefore leaves the previous
entry point in place and the deployment is safe to retry.

## Options

```text theme={null}
tape deploy <INDEX_HTML>
  [--tape <KEYPAIR>]
  [--prefix <PREFIX>]
  [--force]
  [--prune]
```

* `--tape` selects an existing tape keypair instead of the active tape.
* `--prefix preview` publishes as `preview/index.html`,
  `preview/assets/app.js`, and so on.
* `--force` uploads every file even when its size and content match.
* `--prune` removes remote names under the selected prefix that are absent
  locally, after the new `index.html` is published. Without it, old names stay
  on the tape.

Re-running an unchanged deployment writes nothing:

```text Output theme={null}
Deployed 4 files (0 uploaded, 4 unchanged)
Tape: E79y5bh5zTLq9h7SgPGRsDpcmTB1oa7YGscFFFiojy2D
URL:  https://yk5y3rg6cwclvyz7sv763kttt2d2sinpzdm3chuzw72th45s2c3a.tape.site/
```

## Safety boundaries

The entry point must be a readable regular file named exactly `index.html`.
Visible symlinks and other non-regular files are rejected rather than followed.

Every path with a dot-prefixed segment is skipped. In particular,
`.well-known/` is never published, and a dot-prefixed `--prefix` is rejected.
There is no override for this boundary: hosted tape content cannot claim ACME
or domain-verification paths.

The command does not create or resize a tape, because both actions spend from your
wallet and require capacity and expiry choices. Start with `tape create`, or select an
existing keypair with `tape use`.

For arbitrary named-object directory uploads, use
[`tape object sync`](/tools/cli/commands/objects). For the complete hosting
workflow, see [Hosting a Static Site](/tools/hosting).
