# Creating a cluster

Four ways to fill a cluster. They can be mixed - a cluster built from a search can be combined with one uploaded from a file, and the result saved as a third. A small cluster can also be edited as text.

## From search results

Run a search, then use the Cluster button above the results. A window asks how many domains to take from the top of the results - at first as many as your plan's cluster holds - and the cluster's name; **Create cluster** saves the domain names, deduplicated, as a new cluster. Where a search returned several pages of one site, the cluster holds the site once.

This is the usual starting point - worth it even before you need a cluster: the index moves on, and a cluster is the only record of what a query returned at the time it was run.

## From a file

Drop a file of domains, urls or email addresses on the page, or choose it. Each line is reduced to its domain, and only domains in the index are kept - anything else could not be browsed or extracted. A name with www. that is not in the index is looked up without the www. The cluster is named after the file; if none of its domains is in the index, no cluster is created.

After the upload the page sums the file up: lines, different domains, repeats and lines without a domain, and how many domains are in the index. The ones it lists as **not in the index** are names the index has no website for: one PublicWWW has not indexed yet, or a typo.

Useful the other way round: start from your own list of customers, competitors or leads instead of a query, and narrow a cluster made from a search to it with **AND** - or to everything but it with subtraction.

## From a list in a text box

A short list needs no file: **Paste a list**, next to the upload, opens a text box. Type or paste up to 1,000 domains, urls or email addresses, one per line, name the cluster and create it. The lines are read the same way as a file's, and only the domains in the index are kept, as many as your plan's cluster holds. A domain in another alphabet, such as `пример.рф`, is converted to punycode, the form the index keeps. The page then says how many were found and names up to 20 of those that were not, so a typo is easy to spot.

## Editing a small cluster

A cluster of up to 1,000 domains can be edited as text: the page icon in its row opens its domains in the same text box, one per line. Add, remove or change lines and save - the cluster keeps its name and number and gets the new list, again only the domains in the index. For a larger cluster the icon is greyed out: download it, edit the file and upload it as a new cluster.

## From other clusters

Boolean operations build a cluster out of two existing ones:

| Operation | Result | Answers |
| --- | --- | --- |
| **AND** (intersection) | Sites in both. | Who runs both of these things? |
| **OR** (union) | Sites in either, each once. | Everyone running any version of this. |
| **Subtraction** | Sites in one and not the other. On the website the buttons go by the date the clusters were made: **New - Old** leaves the sites of the newer cluster that are not in the older one, **Old - New** the other way round. In the API and MCP it is the first cluster given minus the second. | Who dropped it? Who is new since last time? |

Subtraction across time is what makes clusters more than a saved list. Store a query's results today, store them again after the next PublicWWW update, and subtract in either direction: one way gives the sites that adopted the signature, the other the sites that lost it. Worked through step by step in [tracking a widget change](https://publicwww.com/docs/clusters/example-widgets/).

## Reading a cluster back

Any cluster can be browsed page by page in the interface, downloaded as a file, used as the input to another operation, or [extracted](https://publicwww.com/docs/clusters/extraction/) for content found on its sites.

Source: https://publicwww.com/docs/clusters/creating/
