---
summary: Every piece of content belongs to a site. Sites are isolated; agents pass
  `X-Site-ID` on each request.
title: Sites & multi-tenancy
path: concepts/sites-and-multi-tenancy
status: published
---

# Sites & multi-tenancy

A **site** is the unit of tenancy. One ScaiCMS deployment can serve any
number of sites — each with its own content tree, template pack, locales,
RBAC scope, and email configuration.

## Properties of a site

| Field | Meaning |
|---|---|
| `id`, `slug` | Identity |
| `name` | Display name |
| `domains[]` | One or more domains; one is `is_primary` |
| `default_locale`, `supported_locales` | Multilingual config (see [Translations](/docs/scaicms/concepts/translations)) |
| `template_pack_id` | Active theme; the delivery service uses this |
| `settings` | Free-form JSON: emails, search index, public name, etc. |

## Site context

Every request to the backend that touches content carries an `X-Site-ID`
header. The middleware looks it up, attaches the site object to the request
state, and downstream code filters its queries by that ID. Without the
header, content endpoints return 400.

```bash
curl -H "Authorization: Bearer $JWT" \
     -H "X-Site-ID: 30847722-3fae-477a-b7ce-34e6fce390fe" \
     http://localhost:8000/api/v1/content
```

Some surfaces are global and don't take a site header — users, groups, roles,
the docs subsystem (which is namespace-scoped, not site-scoped). The error
message tells you which one a given endpoint expects.

## Multi-tenancy on delivery

Delivery resolves `Host:` to a site, so the URL alone is enough. Each site
gets its own:

- Active template pack and partial caching keys.
- Navigation tree (rebuilt per-locale).
- `robots.txt`, `sitemap.xml`, `/docs/llms.txt`, `/docs/llms-full.txt`.
- Form-submission inbox.

## Cross-site sharing

Content is **per-site**. The docs subsystem is **global** — a single
namespace can be mounted on multiple sites (see [Docs subsystem](/docs/scaicms/concepts/docs-subsystem)).
For everything else, duplicating content into multiple sites is the
pattern.
