# Allowed sites

> Page: https://docs.plotwork.dev/allowed-sites. Index of every page: https://docs.plotwork.dev/llms.txt

Show a private diagram from your organisation's library as an image on websites you name, such as your Confluence or your intranet. Any other website sees a card that says the diagram is private. This is part of the Enterprise plan.

## TL;DR

| Question | Answer |
|---|---|
| What is it? | A link, `https://api.plotwork.dev/o/<token>.svg`, that shows the picture only to pages on the websites you list. |
| Which websites? | Exact host names, such as `wiki.acme.com`, or a wildcard, such as `*.atlassian.net`, which covers every subdomain and not `atlassian.net` itself. |
| What does every other page see? | A card that says "Private diagram" and nothing about the diagram. |
| Is it access control? | No. Plotwork checks the website the browser reports. That stops casual reuse; anyone can forge it from a script. |
| Does it show the source? | No. The picture never carries the diagram's text. |
| Who turns it on? | The organisation's owner, in **Settings**. It is off by default. |
| Who makes links? | The owner and admins for any diagram, and a member for a diagram they published. |
| Which diagrams? | Any except one labelled Confidential or waiting for approval. |
| Does it work on GitHub? | No. GitHub fetches images through its own proxy, which names no page. |
| Is anything kept about views? | A count a day for each website, with the website's host name only. |

## 1. Turn it on

The owner opens the organisation, then **Settings**, then **Sharing and keeping diagrams**, and turns on **Allow diagrams on chosen websites**. On a plan without it, the switch says **Part of Enterprise**.

Turning it off ends every link at once. If links exist, Plotwork asks first and says how many end.

## 2. Make a link

1. Open the diagram in your organisation's library and choose **Share**.
2. Under **Websites**, choose **Add websites**.
3. Type each website and press Enter. Write only the host: `wiki.acme.com`, not `https://wiki.acme.com/spaces/ENG`.
4. Give it a name if you like, such as the page it is for, and choose when it ends: never, in 30 days, in 90 days or in a year.
5. Choose **Make link**.

The card shows the address with **Copy link**, and what to paste:

| Tab | What it gives | Where |
|---|---|---|
| Markdown | `` | A wiki or page that reads Markdown |
| HTML | `<img src="address" alt="name">` | An intranet page |
| Confluence | `!address!` | Confluence wiki markup, or paste the address into **Insert image**, then **Link** |

A diagram has at most five links, and a link names at most 20 websites. Edits to the diagram show on every page within a minute.

## 3. What each page sees

| Page | What it sees |
|---|---|
| A page on a website the link names, over https | The diagram |
| A page on any other website | The private card |
| A page that sends no website, such as one with `Referrer-Policy: no-referrer` | The private card |
| The address opened in its own tab | The private card |
| A GitHub README, issue or pull request | The private card, because of GitHub's image proxy |
| A link that was rotated, deleted or has ended | The private card |

The card is a normal picture, so a page never shows a broken image.

## 4. Why this is not access control

A browser tells Plotwork which website a page is on, in the `Origin` or `Referer` header, and Plotwork shows the picture only when that website is on the list. A browser sends only the website, never the page, so a path cannot be checked.

Anyone can send those headers from a script. So allowed sites stop the casual cases: a link pasted into another wiki, a crawler, a screenshot tool. They do not stop someone who has the address and wants the picture. Keep anything secret in diagrams that stay in the library, or label them Confidential, which no link can show.

For Confluence Cloud, the [Confluence app](https://docs.plotwork.dev/confluence.md) is the stronger choice: only people who can read the page see the diagram, and there is no address to copy.

## 5. Rotate, change or delete a link

| Action | What happens |
|---|---|
| **Change websites** | The address stays. The new list counts within a minute. |
| **Rotate** | A new address at once. The old one shows the private card, so every page needs the new address. |
| **Delete** | The address shows the private card from then on. |

Each asks first where it would break a page. Deleting a diagram, or labelling it Confidential, ends its links.

## 6. Views

Each link's card lists the last 30 days by website: how often the diagram was shown, how often the private card was, and the last day it was asked for. Owners and admins can read every link's views through the API.

Plotwork keeps, for each request, the organisation, the link, the host name of the page that asked and whether it was shown. It keeps no address, path, person or network address.

## 7. With your other settings

| Setting | How it works with allowed sites |
|---|---|
| Members must publish to the organisation | Links are allowed. A link is the organisation's own choice for its own diagram. |
| Allow public sharing of individual diagrams | Separate. A diagram can have a public link, website links, both or neither. |
| Share only diagrams labelled Public | Does not apply. A website link is not public. |
| Public sharing needs approval | Does not apply, for the same reason. |
| Secret scanning set to Block | A diagram that holds what looks like a secret gets no link. |
| Classification label Confidential | No link, and an existing one ends. |

## 8. Messages

| Message | What to do |
|---|---|
| Showing private diagrams on chosen websites is part of the Enterprise plan. | Ask Plotwork about Enterprise. |
| Diagrams on chosen websites are off for this organisation. | Ask the owner to turn it on in Settings. |
| This diagram is labelled Confidential. | An owner or admin can change its label, if it may leave the library. |
| Leave out https:// and write only the host. | Type `wiki.acme.com`, not the full address. |
| Too broad. A wildcard needs a domain after it. | Use `*.acme.com`, not `*.com`. |
| A diagram has at most 5 website links. | Delete one, or add websites to one you have. |

## See also

| Doc | Why |
|---|---|
| [Organisations](https://docs.plotwork.dev/organisations.md) | The library, roles and the other Settings |
| [Confluence app](https://docs.plotwork.dev/confluence.md) | Diagrams on Confluence pages for the people who can read them |
| [Hosted diagrams](https://docs.plotwork.dev/hosted-diagrams.md) | Public links anyone can open |
| [Classification labels and publish approval](https://docs.plotwork.dev/classification-and-approval.md) | Confidential, and what it keeps in the library |
| [Audit log](https://docs.plotwork.dev/audit-log.md) | The events each link records |
