> For the complete documentation index, see [llms.txt](https://help.usejimo.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.usejimo.com/docs/publish/target-specific-urls-domains-where.md).

# Where: target pages and domains

Choose the pages and devices an experience shows on: what a URL rule is matched against, the operators, the domain filter, trailing slashes and single-page apps.

**Where** sets the pages an experience shows on, and the devices. It works on the part of the URL after the domain; the domain itself is the job of the environment you pick when you publish.

**You will have at the end:** URL rules that match the pages you mean, tested before you publish, and none of the usual surprises with trailing slashes, query strings or hash routes.

***

## Environment or Where

<figure><img src="https://2794860263-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FKzAcDWQbK1gKbpra7bkb%2Fuploads%2F5xvLYc9kb2Y9REoUqaWe%2FB-03-what-where-matches.png?alt=media" alt="In https://b2b.usejimo.com/pages/billing.html?tab=1#top, the host b2b.usejimo.com goes to the environment, and the path, query and hash go to Where"><figcaption></figcaption></figure>

| Part of the URL                  | Example                         | Decided by                                                                                                                                                       |
| -------------------------------- | ------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Host                             | `b2b.usejimo.com`               | The environment, picked at publication. See [Environments and domains](https://help.usejimo.com/docs/getting-started/your-workspace/environments-and-domains.md) |
| Path, query string, `#` fragment | `/pages/billing.html?tab=1#top` | The Where rules of the experience                                                                                                                                |

Write only the path in Where, and leave the domain to the environment. A Where domain filter that names a domain outside the selected environment matches nothing.

## Choose the pages

<figure><img src="https://2794860263-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FKzAcDWQbK1gKbpra7bkb%2Fuploads%2F230RO1rrKBZhcEB4cP7Q%2FB-s05-where-filtered-urls.png?alt=media&amp;token=3f02eccd-1dd7-478a-903a-9cd91c69825b" alt="Where section: Desktop checked under Select devices to show this experience on, On filtered URLs selected under Page to show this experience, one rule Equals /pages/billing.html, the Add rule manually and Generate rules with AI buttons, the domain b2b.usejimo.com with Tips, and the Test your URL field"><figcaption></figcaption></figure>

Under **Page to show this experience**, three options. For a tour that runs over several pages, Where sets the page it starts on.

#### On all pages

Every page where the Jimo snippet runs. For a tooltip, a hotspot or a hint pinned to an element, the experience still only shows where that element exists. If the element is not unique, every matching element on each page is targeted.

#### On a specific page

One full address, such as `https://b2b.usejimo.com/pages/billing.html`. If you opened the builder on a page of your app, the field can come pre-filled with that address. The field cannot be left empty: without an address, the Where summary reads **Missing url**.

<figure><img src="https://2794860263-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FKzAcDWQbK1gKbpra7bkb%2Fuploads%2FPdXAqVAop7gAYXNA7QSh%2FB-s15-where-missing-url.png?alt=media&amp;token=333c7357-25bd-468c-95a2-4bc8d35c6928" alt="Target Experience summary with Where set to On Desktop, Missing url, because On a specific page has no address"><figcaption></figcaption></figure>

#### On filtered URLs

Up to 20 rules on the path, combined so that a page must match all of them or any of them, plus an optional domain filter. This is the option for a group of pages, for pages with ids in the URL, and for exclusions. Set it up as below.

## Write and test rules

{% stepper %}
{% step %}

### Add the rules

Click **Add rule manually**, pick an operator and type the value. For every page under `/products`, add `starts with /products`. Add as many rules as you need, and choose whether a page must match all of them or any of them.
{% endstep %}

{% step %}

### Or generate them with AI

Click **Generate rules with AI** and describe the pages in plain words, such as "every project page, but not the settings". Jimo writes the rules, so you do not have to write a regex by hand. Read them before you keep them.

<figure><img src="https://2794860263-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FKzAcDWQbK1gKbpra7bkb%2Fuploads%2FfRuMALaJHd01Svbx81r5%2Fimage.png?alt=media&amp;token=2852dc12-b640-4eb0-875c-83d120bb25f1" alt="Generate rules with AI: the prompt that describes the target pages"><figcaption></figcaption></figure>

<figure><img src="https://2794860263-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FKzAcDWQbK1gKbpra7bkb%2Fuploads%2FxT0XYeyGaQ9lfVir57m2%2Fimage.png?alt=media&amp;token=1b406178-ba1c-46c5-90ba-4dbb77c402c0" alt="Rules generated from the prompt, listed in On filtered URLs"><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### Narrow to some domains, if needed

Most of the time the environment already sets the domains and the filter stays empty. When the rules must only run on some hosts, fill the domain filter, see [The domain filter](#the-domain-filter). With generated rules, also set the domain, so that they stay on the right site.
{% endstep %}

{% step %}

### Test your URL

Type a full address in **Test your URL** to check whether it matches the rules you set. Test the pages where the experience must show, and the pages where it must not.

<figure><img src="https://2794860263-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FKzAcDWQbK1gKbpra7bkb%2Fuploads%2F9riKUJsWexbcxZJeFJGM%2FB-s14-where-test-your-url.png?alt=media&amp;token=a13729a1-41d7-4b36-baab-84addf8e3d23" alt="Where rules: Starts with /pages/dashboard, the domain b2b.usejimo.com with Tips, and Test your URL with https://b2b.usejimo.com/pages/dashboard and the message Your experience will be shown on the given URL"><figcaption></figcaption></figure>
{% endstep %}
{% endstepper %}

## What a rule is matched on

A rule is compared with everything after the domain: the path, the query string and the `#` fragment together.

| The user is on                | `equals /pages/billing.html` | `starts with /pages/billing` | `contains billing` |
| ----------------------------- | ---------------------------- | ---------------------------- | ------------------ |
| `/pages/billing.html`         | Match                        | Match                        | Match              |
| `/pages/billing.html?tab=1`   | No match                     | Match                        | Match              |
| `/pages/billing.html/`        | No match                     | Match                        | Match              |
| `/pages/profile.html#billing` | No match                     | No match                     | Match              |

#### Trailing slash

Many apps add a `/` at the end of the URL. An `equals` rule then fails. Use `starts with`, or a regex that accepts both: `^/pages/billing\.html/?$`.

#### Query strings

`equals /` matches the home page only without parameters, not `/?tab=1`. Use `starts with`, or `matches regex` `^/(\?.*)?$` for the home page with any query string.

#### Hash-routed apps

In an app whose screens live after `#`, such as `/#/projects/123`, the fragment is part of what the rule reads. Target it like any path: `starts with /#/projects/`.

## Operators

| Operator                                 | Matches when the address after the domain | Use it for                                        |
| ---------------------------------------- | ----------------------------------------- | ------------------------------------------------- |
| **Equals** / **Doesn't equal**           | is exactly the value                      | One page without parameters                       |
| **Starts with** / **Doesn't start with** | begins with the value                     | A section of the app, `/settings`                 |
| **Ends with** / **Doesn't end with**     | ends with the value                       | A file or last segment, `.html`                   |
| **Contains** / **Doesn't contain**       | holds the value anywhere                  | A keyword, exclusions                             |
| **Matches regex**                        | matches the regular expression            | Ids, "something after a prefix", several variants |

The **Doesn't** operators exclude. Combine a positive rule with a **Doesn't** rule and match all of them: **Starts with** `/pages/` and **Doesn't contain** `/sign-in`. Every other operator can also be written as a regex.

#### Variable parts of a URL

Ids and other variable parts of a URL go in a `matches regex` rule: the other operators read the value as plain text.

| You want to match                      | Rule                    | Matches                                     | Does not match                        |
| -------------------------------------- | ----------------------- | ------------------------------------------- | ------------------------------------- |
| Any user profile, `/user/<id>/profile` | `^/user/[^/]+/profile$` | `/user/42/profile`                          | `/user/42/settings`                   |
| An article in any category             | `^/blog/[^/]+/article`  | `/blog/108/article`, `/blog/tuto_1/article` | `/article108`, `/blog/article/tuto_1` |
| A blog post by year and month          | `^/blog/\d{4}/\d{2}/`   | `/blog/2026/10/launch`                      | `/blog/latest`                        |

#### Regex you will reuse

| Need                                                     | Rule                                            |
| -------------------------------------------------------- | ----------------------------------------------- |
| A record page, any id: `/projects/123`                   | `matches regex` `^/projects/[^/]+$`             |
| At least one segment after a prefix, not the bare prefix | `matches regex` `^/#/enrich/product/.+`         |
| The same page with or without a trailing slash           | `matches regex` `^/pages/billing\.html/?$`      |
| A page with any query string                             | `matches regex` `^/pages/billing\.html(\?.*)?$` |

`starts with /#/enrich/product/` also matches `/#/enrich/product/` itself. Use the regex with `.+` when the page must have something after the prefix. Escape a literal dot as `\.`.

<details>

<summary>Regex basics</summary>

A regular expression describes a pattern instead of a fixed text. The pieces you need most:

| Piece       | Means                                     |
| ----------- | ----------------------------------------- |
| `[a-z]`     | Any one letter between a and z            |
| `[^/]+`     | One or more characters that are not a `/` |
| `\d`        | Any digit                                 |
| `a+`        | One or more `a`                           |
| `.+`        | One or more characters of any kind        |
| `^` and `$` | The start and the end of the address      |

A vertical bar means "or": `(ape|bee)` matches `ape` or `bee`.

To learn and test patterns: [ihateregex.io](https://ihateregex.io/) and [Rubular](http://rubular.com/). Then check the rule in **Test your URL**.

</details>

## The domain filter

With On filtered URLs, the domain filter narrows the rules to some hosts. Most of the time the environment already does this, and the filter stays empty. A typical use: the same rule on two sites, such as `blog.yourapp.com` and `test.yourapp.com` in the domain filter with `starts with /article_` as the rule, for every article on both.

* Write the host only: `app.acme.com`, `localhost:3000`. A full URL with `https://` or a path never matches.
* Several domains: separate them with a space, or press Enter after each one.
* The `www.` of the page is ignored: write `acme.com`. This rule is for the Where domain filter only. The **Domains** field of an environment is a different field with its own rule: there, a `www.` prefix is part of the host, see [Environments and domains](https://help.usejimo.com/docs/getting-started/your-workspace/environments-and-domains.md#what-the-domains-field-accepts).
* An entry with regex characters is read as a regular expression: `\.acme\.com$` for every subdomain.
* With On all pages or On a specific page, the domain filter is ignored.

## Devices

Under **Select devices to show this experience on**: **Desktop**, **Tablet**, **Mobile**. A new experience is set to desktop only. You can tick several devices on the same experience. When the content needs a different copy or layout on small screens, duplicate the experience and adjust each copy for its device.

<details>

<summary>Best practices and common cases</summary>

* **Map the journey first.** List the pages where users need help, then write rules for those pages only.
* **Start broad, then refine.** A `starts with` on a section is easier to keep right than ten `equals` rules. Narrow it once you see how users move.
* **Keep broad targeting for broad news.** A general announcement can run on all pages.
* **Review the rules when your app changes.** A renamed route silently stops matching.
* **A step on another page?** Rules decide where an experience starts. For a tour that moves across pages, the step before takes users to the next page, see [Tours across several pages](https://help.usejimo.com/docs/experiences/tours-and-modals.md#tours-across-several-pages).

| Case                                         | What to do                                                                                                |
| -------------------------------------------- | --------------------------------------------------------------------------------------------------------- |
| Users at a given stage, onboarding, checkout | Rules on the paths of that stage                                                                          |
| Two URLs that differ by a detail             | A regex that tells them apart                                                                             |
| Pages where the experience is not wanted     | A **Doesn't contain** or **Doesn't start with** rule                                                      |
| Users who did something before               | Rules for the page, conditions in [Who](https://help.usejimo.com/docs/publish/target-right-people-who.md) |
| Mobile users                                 | Tablet and Mobile in Devices, then test on a phone                                                        |

</details>

## From your assistant

Ask: *"Show the Billing banner only on /pages/billing.html on b2b.usejimo.com."* The preview warns that `equals` excludes the same page with a query string, and says whether visibility widens or narrows. More in [What to ask?](https://help.usejimo.com/docs/integrations/mcp/what-to-ask.md)

## Verify

* Type the address of a target page in **Test your URL**: it matches. Type a page where the experience must not show: it does not.
* Open the Troubleshoot tool on the page you target. If the URL condition is unmatched, the experience is **Ineligible**: compare the address in your browser, character by character, with the rule.
* Check the end of the address for a `/`, a `?` or a `#` that your rule does not expect, and the rule itself for a space before or after the value.

## Go further

* [Environments and domains](https://help.usejimo.com/docs/getting-started/your-workspace/environments-and-domains.md): what the Domains field accepts.
* [Targeting on dynamic apps](https://help.usejimo.com/docs/build/positioning/targeting-on-dynamic-apps.md): single-page apps and dynamic selectors.
* [Why my experience does not show](https://help.usejimo.com/docs/getting-started/publish-your-first-experience/why-my-experience-does-not-show.md), cause 3.
* [In-app tour of Where](https://i.usejimo.com/tours?jimo_poke=10049ddf-25b4-4826-9606-37f52f893907): opens a guided tour of the section in your Jimo dashboard.

**Next page:** [Who: target the right users](https://help.usejimo.com/docs/publish/target-right-people-who.md)
