Redirects
Redirects allow Ecommerce Search to detect when a search phrase exactly matches a known entity — such as a category name, product name, SKU, or custom attribute — and instruct the frontend to navigate the user to a dedicated page rather than displaying generic search results.
Why redirects?
Many shops invest significant effort in optimizing category landing pages with curated branding, boost configurations, quick filters, and subcategory navigation. However, when a user searches for "running shoes", the search result page returns a broad result set — missing all the curated work done on the "Running Shoes" category page.
Redirects bridge this gap by sending users directly to these optimized pages when their search intent clearly maps to a specific category or product.
How it works
When a user searches with a FullSearch scope, Ecommerce Search performs a redirect check before executing the full search:
The redirect check only runs when:
- A search phrase is present
- The search is a pristine search (no user-applied filters or facets)
- Redirect settings are enabled for the segment
Redirect types
Category redirect
When enabled, if the search phrase exactly matches a category name that exists uniquely in the product catalog, the response includes a redirect to that category.
Example: Searching "Running Shoes" when a category named "Running Shoes" exists with a unique category path and contains at least one product.
Product name redirect
When enabled, if the search phrase exactly matches a product name and resolves to exactly one unique product, the response includes a redirect to that product detail page (PDP).
SKU ID / SKU number redirect
When enabled, if the search phrase matches a SKU ID or SKU number and resolves to exactly one unique product, the response includes a redirect to that product.
Custom attribute redirect
Custom string attributes from the product catalog can be configured as redirect sources. For example, if a "brand" attribute is configured, searching for "Nike" could redirect to a brand-filtered product listing page (PLP).
Validation rules
Before a redirect is triggered, it must pass validation:
| Redirect type | Validation rule |
|---|---|
| Category | Category name must be globally unique (only one category path) and contain at least one product |
| Product name | Must resolve to exactly one unique product ID (variants are allowed) |
| SKU ID | Must resolve to exactly one unique sku |
| SKU number | Must resolve to exactly one unique sku |
| Custom attribute | Must resolve to at least one product with matching attribute value |
Excluded search phrases
Certain search phrases can be excluded from ever triggering a redirect. This is useful for generic or high-traffic terms like "sale", "new arrivals", or "clearance" where a redirect would be disruptive to the browsing experience.
When a user searches for an excluded phrase, the redirect check is skipped entirely — the search proceeds as a normal search regardless of whether the phrase matches a category, product, or custom attribute.
Excluded phrase example
A shop has a category named "Sale". Without an exclusion, searching for "sale" would redirect to the Sale category page. By adding "sale" as an excluded phrase, the user sees normal search results instead.
Excluded phrases are matched case-insensitively.
Phrase mappings
Phrase mappings provide a manual override for redirect behavior. A phrase mapping links a specific search phrase to a category or custom attribute value, bypassing the normal redirect resolution logic.
This is useful when:
- The automatic redirect resolves to the wrong target (e.g., a phrase matches multiple categories)
- A desired redirect cannot be detected automatically (e.g., mapping "sneakers" to the "Running Shoes" category)
- Marketing campaigns require specific redirects for branded search terms
Each phrase mapping specifies:
| Field | Description |
|---|---|
| Search phrase | The phrase that triggers the redirect (case-insensitive) |
| Field name | The target redirect field (a category or enabled custom attribute) |
| Field value ID | The specific value to redirect to (e.g., a category ID or attribute value) |
Note
Phrase mappings only support category and custom string attribute fields — product name, SKU ID, and SKU number redirects must use the automatic redirect logic.
Resolution priority
When a search phrase is received, the redirect system evaluates in this order:
- Excluded phrases — if the phrase is excluded, no redirect is triggered
- Phrase mappings — if a manual mapping exists, use it directly
- Automatic redirect resolution — standard category/product/SKU/attribute matching
Search response
When a redirect is detected, the search response includes an action object containing the redirect filters the frontend should apply.
Full search response with redirect
Full search vs. quick search
| Search type | Redirect behavior |
|---|---|
| Full search | Returns only the action object — no products, content, or other results. The frontend should navigate immediately. |
| Quick search | Returns the action object and limited results. The redirect filters are applied internally, so the returned products match the redirect target. |
Configuration
Redirect settings are configured per segment through the Admin API or the admin UI. Changes go through the publication flow, meaning they must be published before they take effect in live searches.
| Setting | Description |
|---|---|
categoryEnabled |
Enable redirects when the search phrase matches a category name |
productNameEnabled |
Enable redirects when the search phrase matches a product name |
skuIdEnabled |
Enable redirects when the search phrase matches a SKU ID |
skuNoEnabled |
Enable redirects when the search phrase matches a SKU number |
customAttributes |
List of custom string attributes to enable for redirects |
Both excluded phrases and phrase mappings are configured per segment and go through the publication flow.
See Handling Redirects for frontend implementation details and API reference.