
# Site access

A site's access decides who can open it. It applies to the whole site: pages,
[Markdown versions](https://cruma.io/book/cruma-pages/markdown-for-agents.md), `llms.txt` and
`llms-full.txt`, and [apps](https://cruma.io/book/cruma-pages/content-structure.md).

| Access | Who can open the site |
| --- | --- |
| **Public** | Anyone with the address. This is the default. |
| **Organization only** | Signed-in Cruma users who are members of the organization that owns the site and can read its sites. |
| **Email list** | Signed-in Cruma users whose verified email address is on the site's list, and the people who can open an organization-only site (the owner, or the members of the owning organization who can read its sites). |
| **Password** | Anyone who knows the site's shared password. No Cruma account is needed, and a Cruma account does not open the site on its own. |

## Changing a site's access

In the dashboard, each site card has an **Access** row with an **Organization
only**, an **Email list**, a **Password** and a **Public** button. The change applies to the
next request.

**Organization only** is available for sites owned by an organization. Switch to
that organization in the dashboard first. **Email list**, **Password** and
**Public** are available for every site. **Password** needs a password to be set
first.

Changing a site's access needs `pages:write`, or being the owner or an
organization admin.

## Sharing a site with email addresses

Choose **Email list** and an editor opens under the Access row. Type an address
and select **Add**; select **Remove** next to an address to take it off. Spaces
and letter case are ignored, so `Ada@Example.com` and `ada@example.com` are the
same address, and adding one that is already listed changes nothing. A site's
list holds up to 100 addresses.

A visitor is let in when they sign in with Cruma and the email address on their
account is on the list and verified. An address that is not verified never
matches, even when it is listed.

The list is checked on every request. Remove an address and that person's open
session ends: their next request sends them to sign in again, and they then see
the no-access page.

Switching a site to **Public** or **Organization only** keeps its list, but the
list lets nobody in while the site is in another mode. Choose **Email list**
again and the same addresses apply. Deleting the site deletes its list.

Adding and removing addresses needs `pages:write`, or being the owner or an
organization admin.

## Protecting a site with a password

Choose **Password** and an editor opens under the Access row. Type a password of
8 to 128 characters and select **Set password**; the site is then protected by
it. A password that is too short or too long is refused and nothing changes.
The password is write-only: the dashboard shows only whether one is set, and it
cannot be read back. To change it, type a new one and select **Change
password**.

Changing the password signs out everyone who entered with the old one, and so
does switching the site to another mode: their next request asks for the
password again. Switching away keeps the saved password, so choose **Password**
and **Use the saved password** to turn it back on. Deleting the site deletes its
password.

Setting or changing the password needs `pages:write`, or being the owner or an
organization admin.

### What a visitor sees on a password site

A visitor without a session sees a password page in place of the page they
asked for, on every page of the site, its Markdown versions, `llms.txt`,
`llms-full.txt`, the sitemap and its apps. The right password opens the site on
that address, and on that address only, and returns the visitor to the page they
asked for. A wrong, missing or malformed password gets the same page and the
same message every time, so it never says which part was wrong.

After 5 wrong passwords from one visitor, or 50 from all visitors together,
within 15 minutes, further attempts are refused with a `429 Too Many Requests`
answer and a `Retry-After` header that says how many seconds to wait. A correct
password does not count against the limits.

## What a visitor sees on a restricted site

1. A visitor without a session is sent to Cruma to sign in. A password site shows
   its password page instead.
2. After signing in they land on the page they asked for. The sign-in is kept
   for that site, on its Cruma address and on any custom domain.
3. A visitor who is not allowed in sees a **You don't have access** page. It
   names the account they are signed in as and offers **Sign in with a different
   account**, for people who have more than one. If they should have access, an
   organization admin can add them. On an email-list site the page says to ask
   the site's owner to add them, and says so when the address on the account is
   not verified.

A member who is removed from the organization, or who loses read access to the
organization's sites, is asked to sign in again on their next request and then
sees the no-access page.

---

- Book: [Cruma Pages](https://cruma.io/book/cruma-pages.md)
- Previous: [Downloading and self-hosting](https://cruma.io/book/cruma-pages/downloading-and-self-hosting.md)
- Pages: [Home](https://cruma.io/home.md) · [Docs](https://cruma.io/docs.md) · [Pricing](https://cruma.io/pricing.md) · [Share localhost](https://cruma.io/share-localhost.md) · [Webhook testing](https://cruma.io/webhook-testing.md) · [Homelab](https://cruma.io/homelab.md) · [AI coding agents](https://cruma.io/ai-coding-agents.md) · [Cruma vs ngrok](https://cruma.io/ngrok-alternative.md) · [Cruma vs Cloudflare Tunnel](https://cruma.io/cloudflare-tunnel-alternative.md) · [Blog](https://cruma.io/blog.md)
