Skip to main content
A URL rule is one row in the rule builder. It picks a field, an operator, and a value. Locations combine URL rules with AND; audiences use URL fields the same way for URL-scoped rules.

The fields

The operators

The rich fields (URL, URL with query, Path) get the full menu:
  • equals / does not equal
  • contains / does not contain
  • starts with / does not start with
  • ends with / does not end with
  • matches regex / does not match regex
Hostname and query string have a reduced set, equals, contains, starts with, ends with, and their negations. Regex on hostname is not on the menu because in practice it is more error-prone than helpful.

Case sensitivity is per rule

Each URL-family rule has a Case-insensitive toggle.
  • New rules default to on (case-insensitive).
  • Existing rules keep their prior behavior, the toggle is exposed so you can flip them at will.
Why the default flipped: /Pricing, /pricing, and /PRICING are the same page to a human. A rule with case-sensitivity on will silently skip visitors who type or share the “wrong” case, and the failure is invisible on the results page because it looks like “no traffic on this URL yet”.

Regex, if you must

Regex rules are full JavaScript regex. Anchors count, pricing$ matches a URL ending in pricing, ^pricing matches a URL starting with pricing. Case-insensitivity via the toggle takes precedence over inline (?i) in your pattern. Regex is powerful and hard to read. Prefer starts with / ends with when they fit; reach for regex only for truly non-obvious patterns.

Negations do not “include the rest”

does not contain “checkout” does not mean “include every page without checkout”. It means “if the URL contains checkout, exclude it”; the rest of your rules still have to match. Two Locations rules ANDed together:
matches /products/hats but skips /products/hats/admin. The “admin” rule alone does not include anything on its own.

Where these live

  • Inline in the experiment editor under Where it runs.
  • Saved in a Location under Site → Locations. See Saved lists for when to reach for a saved Location.

Not in the URL rule set

  • Geo, country, region, city are Audience rules, not URL rules. See Geo.
  • Device / browser / OS, Audience rules.
  • Cookie or JS conditions, Audience rules, under Custom.
That separation is deliberate. URL rules decide which page; audience rules decide which visitor. Keeping them apart makes broken tests easier to diagnose.