---
title: Subdomains rule
slug: subdomains
description: How the Subdomains rule works in Personizely widgets: which part of the domain is compared, www and root domains, show or hide lists and multi-level subdomains.
image: https://archbee-image-uploads.s3.amazonaws.com/1y1Fr-DMGy_apx7FwibyA/ORDTWfNKMXiY3ZRv0QSgP_personizely-docs-og.png
docTags: 
createdAt: 2026-10-16T20:11:06.544Z
---

The Subdomains rule shows a widget only on the subdomains you list, such as `shop` or `blog`, or on every subdomain except them. Use it when one Personizely website covers several subdomains, for example a store on `shop.example.com` and a blog on `blog.example.com`.

**Available on:** all platforms.

## How it works

The rule reads **Show on** (or **Don't show on**) followed by a list of subdomains. When the page loads, Personizely takes the **first part of the domain** of the current page, everything before the first dot, and compares it with your list. The comparison is exact.

| Page domain           | Compared value |
| --------------------- | -------------- |
| `shop.example.com`    | `shop`         |
| `www.example.com`     | `www`          |
| `example.com`         | `example`      |
| `eu.shop.example.com` | `eu`           |
| `shop.example.co.uk`  | `shop`         |

## Configuration

| Option                  | What it does                                        | Values / default         |
| ----------------------- | --------------------------------------------------- | ------------------------ |
| Show on / Don't show on | Include or exclude the listed subdomains            | **Show on**              |
| Subdomains              | The first part of the domain to match, without dots | One or more, e.g. `shop` |

## Behavior details and limitations

- **Root domains compare their name.** On `example.com` the compared value is `example`. If your site is served on both `example.com` and `www.example.com`, list both `example` and `www`.
- **Only the first part counts.** For `eu.shop.example.com`, list `eu`, not `eu.shop`.
- **Paths are a different rule.** For sections such as `/blog`, use the [Pages rule](https://docs.personizely.net/pages).
- **Checked at page load.**

## Examples

- **Blog-only newsletter popup:** **Show on** `blog`.
- **Hide on the help center:** **Don't show on** `help`, `support`.

## Related

- [Rules overview](https://docs.personizely.net/rules)
- [Pages rule](https://docs.personizely.net/pages)
- [Multiple websites](https://docs.personizely.net/websites)
