# Cross-domain and subdomain tracking

> Track several domains or subdomains as one site or as separate sites, keep visits together without cookies, and stop your own domain showing as a referrer.

## One site, several hostnames

Add every hostname under **Site settings → General → Extra domains**.
Subdomains of a listed domain (`www.`, `shop.`, `docs.`) are accepted
automatically. Then choose:

- **Combined** (default): the visit key doesn't include the hostname, so a
  visitor moving from `example.com` to `shop.example.com` (or to
  `example-checkout.com`) the same day continues the **same visit**, and
  links between them are internal, not referrals.
- **Separate**: the hostname is part of the visit key, so each domain has
  its own visits, as if they were separate sites that share a dashboard.
  Use the **Hostname** tab of the Pages panel to compare them.

No cookies or link decoration are needed to join visits across domains:
visits come from the daily visit key, which is the same on every domain of
the site.

## Your own domain shows up as a referrer

If `shop.example.com` appears as a referrer on `example.com`, it isn't one
of the site's domains. Add it, and it becomes internal.

## Separate sites instead

Create separate sites when the properties have different owners, goals or
privacy settings. Visitors moving between them then show the other site as
a referrer, as for any external site.

## Staging and preview domains

Hits from hostnames that aren't the site's domains are dropped, so
staging (`*.vercel.app`, `*.netlify.app`, `staging.example.com`) doesn't
pollute production data. If staging is a subdomain of your domain,
exclude it with `data-domains` or a hostname
[traffic rule](/docs/privacy/traffic-rules).
