Overview
Semantic Redirects use AI to understand the intent and meaning behind search queries, automatically directing customers to relevant pages instead of showing search results. Unlike keyword-based redirects, semantic matching understands variations and related terms, providing a more flexible and intelligent redirect experience.
Semantic Redirects are managed through a dedicated settings page in the Layers dashboard under Settings → Semantic Redirects.
How it works
When a customer performs a text search, the system evaluates their query against your configured semantic redirects. If the query semantically matches a redirect term, the Search API returns a redirect URL instead of search results:
- Customer searches for “customer service” or “need help”
- The system recognizes the semantic similarity to your configured “support” redirect
- The API returns a
_meta.redirect object with the target URL
- Your frontend navigates the customer to the support page
The semantic matching uses AI embeddings to understand query intent, allowing for flexible matching beyond exact keywords.
When redirects apply
Semantic redirects trigger for text search and autocomplete requests. They do not apply to:
- Image search
- Similar product search
- Browse/collection requests
For text search, the redirect replaces search results entirely (the results array is empty). For autocomplete, the redirect is returned alongside suggestions in _meta.redirect, letting your frontend decide whether to redirect immediately or continue showing suggestions.
This ensures redirects only activate when customers are actively searching with text queries, not when browsing visually or exploring similar products.
Text search
When a semantic redirect is triggered via the Search API, the response includes:
{
"results": [],
"totalResults": 0,
"_meta": {
"redirect": {
"url": "https://yourstore.com/pages/contact-us"
}
}
}
Key characteristics:
- The
results array is empty
totalResults is 0
- The redirect URL is provided in
_meta.redirect.url
Autocomplete
When a semantic redirect is triggered via the Autocomplete API, the redirect is included alongside normal suggestions:
{
"matchedQueries": [
{
"query_text": "support",
"num_searches": 5
}
],
"originalQuery": "support",
"normalizedQuery": "support",
"_meta": {
"redirect": {
"url": "https://yourstore.com/pages/contact-us"
}
}
}
Key characteristics:
- Autocomplete suggestions are still returned normally
- The redirect URL is provided in
_meta.redirect.url
- Your frontend decides whether to redirect immediately or show the suggestions
Common use cases
Customer support queries
Direct searches for help-related terms to your support page:
- “help”, “support”, “customer service”, “contact us”
- Target URL:
https://yourstore.com/pages/contact-us
Brand landing pages
Route brand-specific searches to dedicated brand pages:
- “nike”, “nike shoes”, “nike products”
- Target URL:
https://yourstore.com/collections/nike
Policy and information pages
Send policy-related queries to relevant information:
- “return policy”, “returns”, “refund”, “how to return”
- Target URL:
https://yourstore.com/policies/refund-policy
Direct sale-related searches to campaign landing pages:
- “sale”, “clearance”, “discount”, “deals”
- Target URL:
https://yourstore.com/collections/sale
Store locations
Route location queries to store finder pages:
- “store locations”, “find a store”, “stores near me”
- Target URL:
https://yourstore.com/pages/store-locator
Semantic matching
The AI-powered semantic matching understands query intent beyond exact keywords:
- “need help” matches a redirect configured for “customer service”
- “how do I return something” matches a redirect for “return policy”
- “where can I get support” matches a redirect for “help”
- “what’s on sale” matches a redirect for “clearance”
This flexibility means you don’t need to configure every possible variation—the system understands related concepts and intent.
Query interpretation routing
In addition to direct semantic matching, the query interpretation system provides an additional layer of redirect detection. When a customer types a conversational query like “how do I return my order”, query interpretation identifies it as a non-product query. It then generates short candidate phrases (such as “returns”, “return policy”, “how to return”). These candidates are then checked against your configured semantic redirects.
The interpretation system reads your configured redirect terms and uses them to constrain its candidate generation. This means the AI only suggests redirect phrases that correspond to terms you’ve actually set up, avoiding false positives from invented phrases that don’t lead anywhere. The more redirects you configure, the better the system becomes at recognizing when a query should be redirected.
This two-step approach catches queries that direct semantic similarity alone might miss, particularly natural-language questions and multi-word requests. You don’t need to take any action to benefit from this — it works automatically with your existing semantic redirect configuration.
Configuration
Semantic Redirects are configured in the Layers dashboard:
- Go to Settings → Semantic Redirects
- Click Create Redirect
- Enter the search terms that should trigger the redirect
- Provide the target URL (must be an absolute URL with protocol)
- Save and enable the redirect
For detailed setup instructions, see Create a semantic redirect.
Auto redirect (experimental)
By default, when a semantic redirect matches during a search or autocomplete request, the API returns the redirect URL in _meta.redirect. Your frontend is responsible for navigating the customer. Auto redirect changes this behavior so the Layers pixel or app block intercepts the response and redirects the customer automatically — bypassing the search results page entirely.
This is useful when you want to guarantee that customers never see an empty results page for redirected queries, especially for autocomplete flows where a customer clicks a suggestion that matches a semantic redirect.
How it works
When auto redirect is enabled:
- A customer types a query in your search bar and clicks an autocomplete suggestion, or your storefront makes an immediate search request.
- The Layers pixel intercepts the API response before your frontend processes it.
- If the response contains a
_meta.redirect object, the pixel navigates the customer directly to the redirect URL.
- Your search results page is never rendered for that request.
Requirements
Auto redirect requires the Layers storefront pixel or app block to be installed and loaded on the page. Without the pixel, this setting has no effect — redirects still work, but your frontend must handle them manually as described in the response format section above.
Enabling auto redirect
- Go to Settings → Semantic Redirects in the Layers dashboard.
- Scroll to the Experimental card at the bottom of the page.
- Toggle Auto Redirect on.
The setting takes effect once the updated configuration is synced to your storefront. No code changes are required if the Layers pixel is already installed.
This feature is experimental and may change in future releases. Test thoroughly on your storefront before relying on it in production.
Automatic page crawler
Layers can automatically scan your Shopify pages and create semantic redirects for content that customers commonly search for. This eliminates the need to manually identify every page that deserves a redirect.
How it works
The page crawler runs daily and follows a two-step process:
-
Triage — Layers fetches all published pages from your Shopify store and uses AI to identify which pages are likely candidates for search redirects. Pages like FAQs, return policies, shipping information, contact pages, size guides, and store locators are flagged for analysis. Navigation pages, landing pages, and product-related pages are skipped.
-
Analysis — For each flagged page, the AI reads the full page content and generates 2–6 natural search terms that a customer might type when looking for that information. For example, a returns policy page might produce terms like “returns”, “return policy”, “how to return”, and “refund”.
The crawler then creates semantic redirects for each page, pointing to the page’s URL on your store. It avoids duplicating redirects that already exist and skips terms that conflict with your manually created redirects.
Source tracking
Each redirect in the dashboard displays a Source badge indicating how it was created:
- Manual — Created by you through the dashboard
- Crawler — Automatically generated by the page crawler
This makes it easy to distinguish between hand-crafted redirects and automatically generated ones, and to review or edit crawler-generated redirects as needed.
What the crawler targets
The crawler focuses on informational pages that customers commonly search for:
- FAQ and help pages
- Return and refund policy pages
- Shipping and delivery information
- Contact and “get in touch” pages
- About us and brand story pages
- Size guides and fit guides
- Warranty and guarantee pages
- Care instructions and how-to guides
- Store locator and location pages
- Terms of service and privacy policy pages
Pages that serve as navigation, landing pages, product proxies, or placeholders are automatically excluded.
Managing crawler-generated redirects
Crawler-generated redirects work exactly like manual ones. You can:
- Edit the search terms or target URL
- Disable or delete redirects you don’t want
- The crawler will not recreate a redirect for a page it has already processed within the last 30 days
If you manually create a redirect that overlaps with a crawler-generated one, the crawler respects your manual redirect and avoids creating conflicting terms.
Best practices
Use broad terms - Configure redirects for general concepts rather than specific variations. The semantic matching will handle related queries.
Provide absolute URLs - Always use full URLs including the protocol (https://) to ensure redirects work correctly.
Test thoroughly - Use the Test Text Search tool to verify redirects trigger for expected queries and don’t activate unexpectedly for product searches.
Monitor search analytics - Review which queries trigger redirects to identify gaps or opportunities for additional redirects.
Consider the customer journey - Redirect to pages that help customers accomplish their goals, whether that’s finding information, getting support, or discovering products.
Avoid over-redirecting - Don’t redirect queries that should show product results. Reserve redirects for informational queries, support requests, and specific landing pages.
See also