---
title: Pages rule
slug: pages
description: How the Pages rule works in Personizely widgets: path matching, the * and ** wildcards, trailing slashes, query strings, Shopify templates and market URLs.
image: https://archbee-image-uploads.s3.amazonaws.com/1y1Fr-DMGy_apx7FwibyA/ORDTWfNKMXiY3ZRv0QSgP_personizely-docs-og.png
docTags: 
createdAt: 2026-10-16T20:11:51.525Z
---

The Pages rule shows a widget only on the pages you list, or on every page except them. Pages are matched by their path, the part of the URL after the domain, such as `/products/linen-shirt`, and you can use wildcards to match whole sections of your site.

**Available on:** all platforms.

## How it works

The rule reads **Show on** (or **Don't show on**) followed by a list of paths. The widget passes when the current page matches **any** path in the list (or, with **Don't show on**, none of them). It's checked when the page loads.

### Path syntax

| Pattern                     | Matches                                            | Doesn't match                       |
| --------------------------- | -------------------------------------------------- | ----------------------------------- |
| `/pricing`                  | `/pricing`, `/pricing/`                            | `/pricing/annual`, `/Pricing`       |
| `/`                         | The homepage                                       | Any other page                      |
| `/blogs/*`                  | `/blogs/news`                                      | `/blogs/news/first-post`, `/blogs/` |
| `/blogs/**`                 | `/blogs/`, `/blogs/news`, `/blogs/news/first-post` | `/blogs`                            |
| `/collections/*/products/*` | `/collections/sale/products/linen-shirt`           | `/products/linen-shirt`             |

- `*` matches exactly one path segment: any characters except `/`, at least one.
- `**` matches anything, including several segments, or nothing at all.
- Matching is **case-sensitive** and covers the **whole path**. `/pricing` doesn't match `/pricing-plans`. The pattern `/pricing*` matches `/pricing-plans` but not `/pricing` itself, so list both when you need both.
- A trailing slash on the visited page is ignored: `/pricing` also matches `/pricing/`. The reverse isn't true: the pattern `/pricing/` doesn't match `/pricing`.
- The domain, query string and `#` fragment are ignored. `/search` matches `/search?q=shoes`. To check a query parameter, use the [Query string rule](https://docs.personizely.net/query-string-rule).

When you paste a full URL, Personizely keeps only its path. If you forget the leading `/`, it's added for you.

## Configuration

| Option                  | What it does                        | Values / default                     |
| ----------------------- | ----------------------------------- | ------------------------------------ |
| Show on / Don't show on | Include or exclude the listed pages | **Show on**                          |
| Pages                   | The paths to match                  | One or more paths, wildcards allowed |

### Templates

Under **Add rule → Use template → Page-based**:

| Template                 | Rule it creates                                     | Platforms |
| ------------------------ | --------------------------------------------------- | --------- |
| Show on homepage         | Show on `/`                                         | All       |
| Don't show on homepage   | Don't show on `/`                                   | All       |
| Show on product pages    | Show on `/products/**`, `/collections/*/products/*` | Shopify   |
| Show on collection pages | Show on `/collections/*`                            | Shopify   |
| Show on cart page        | Show on `/cart`                                     | Shopify   |

## Behavior details and limitations

- **Shopify market and language URLs.** Stores with subfolder markets or languages use paths such as `/fr/products/linen-shirt`. The templates above don't match them. Add the prefixed patterns too (for example `/fr/products/**`), or use the [Product pages](https://docs.personizely.net/product-pages) rule, which recognizes the product page whatever the URL.
- **`/blogs/*` is narrower than it looks.** `*` stops at the next `/`. Use `**` for a section and everything under it.
- **Combine rules for exceptions.** Add one Pages rule with **Show on** `/products/**` and a second with **Don't show on** `/products/gift-card`. Both must pass.
- **Checked at page load.** On themes that change pages without a full reload, the rule is checked again after each detected page change.

## Examples

- **Everywhere except the cart and account pages:** **Don't show on** `/cart`, `/account`, `/account/**`.
- **Blog posts only:** **Show on** `/blogs/*/*`.
- **Landing pages:** **Show on** `/pages/summer-sale`, `/pages/black-friday`.

## Troubleshooting

- **Widget doesn't show on a page you listed** → check the exact path and its case in the address bar. A localized store may prefix it with `/en-us` or similar.
- **Widget shows on the page with a query string you wanted to exclude** → query strings are ignored by this rule. Add a Query string rule.

## Related

- [Rules overview](https://docs.personizely.net/rules)
- [Product pages rule](https://docs.personizely.net/product-pages)
- [Subdomains rule](https://docs.personizely.net/subdomains)
- [Query string rule](https://docs.personizely.net/query-string-rule)
