> ## 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.

# Serve Site Path

> Serve an object from a tape by path, rendered inline.

Resolves `{path}` as an object name on `{tape}` and serves the backing content inline, so a browser renders it in place. This is the read side of [static site hosting](https://docs.tape.network/tools/hosting.md); the same object is always reachable by track address through [get object](https://docs.tape.network/apis/gateway/objects/get-object.md).

The same serving also answers by hostname: a request whose Host matches a configured custom domain or subdomain serves that tape from the domain root, with identical semantics and no `/site` prefix ([custom domains](https://docs.tape.network/tools/hosting.md#custom-domains-and-subdomains)).

## Path resolution

An empty path or one ending in `/` resolves `index.html` under that prefix, and the bare `/site/{tape}` form redirects (`308`) to `/site/{tape}/`. A path with no matching object serves the tape's `404.html` with status `404` when present, plain `404` otherwise. `?download=1` switches the response to an attachment named after the file.

`Range` headers work as on [get object](https://docs.tape.network/apis/gateway/objects/get-object.md).

## Response headers

| Header | Value |
| - | - |
| `Content-Type` | from the object's metadata, or inferred from the path extension when unknown |
| `ETag` | the content commitment |
| `Cache-Control` | `public, max-age=60, must-revalidate` |
| `X-Content-Type-Options` | `nosniff` |
| `Content-Security-Policy` | same-origin policy for served pages |

Name-addressed URLs revalidate rather than cache forever, because a name can be re-pointed at new content. `If-None-Match` with the current ETag answers `304 Not Modified`.

## Errors

`404` covers both an unknown tape path and content the network hasn't certified yet. Everything else follows the [shared error conventions](https://docs.tape.network/apis/gateway.md). The route is metered per IP on its own site bucket ([rate limits](https://docs.tape.network/apis/rate-limits.md)).

## Example

```bash theme={null}
curl -i "$TAPE_GATEWAY/site/7f3kD9mQxYz2pW8vN4cRtE5uH6bJamd9GvKq2rTeUWXs/"
```

```text Response theme={null}
HTTP/2 200
content-type: text/html; charset=utf-8
etag: "HxbTgzim3nRPhWSyBEUvvteNRWLbrAxV3rDJyoW4mZ5J"
cache-control: public, max-age=60, must-revalidate
x-content-type-options: nosniff
accept-ranges: bytes
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.