Skip to main content

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 also catches variations and related terms.

Before you start

  • Redirects only work for text search queries. They don’t apply to image search, similar product search, or browse requests.
  • When Layers triggers a redirect, customers see no search results. Layers immediately directs them to the target URL.
  • On a Shopify theme with the Layers app embed enabled, redirects work automatically. A custom storefront that doesn’t use the app embed needs its own code to follow the redirect.

Prerequisites

Enable the Layers app embed in your Shopify theme. It follows redirects for you. If you run a custom storefront without the app embed, your developer needs to follow the redirect returned by the search and autocomplete APIs. See What the app embed handles.

Steps

  1. Go to Settings → Semantic Redirects in the Layers dashboard.
  2. Click Create Redirect.
  3. Enter the search terms that should trigger the redirect:
    • Add the primary term or phrase customers might search for
    • Semantic matching covers related variations automatically
  4. Enter the target URL:
    • Provide the full URL where customers should be redirected
    • Use absolute URLs (e.g., https://yourstore.com/pages/contact-us)
  5. Save and enable the redirect.

Common use cases

Customer support queries

Redirect searches for help-related terms to your support page: Search term: “customer service” Redirect URL: https://yourstore.com/pages/contact-us Semantic matching also catches variations like “help”, “support”, “contact us”, “need help”, etc.

Brand landing pages

Direct brand-specific searches to dedicated brand pages: Search term: “nike” Redirect URL: https://yourstore.com/collections/nike Semantic matching also catches variations like “nike shoes”, “nike products”, “nike brand”, etc.

Policy and information pages

Route policy-related queries to relevant information: Search term: “return policy” Redirect URL: https://yourstore.com/policies/refund-policy Semantic matching also catches variations like “returns”, “refund”, “how to return”, etc.

Promotional campaigns

Send sale-related searches to campaign landing pages: Search term: “sale” Redirect URL: https://yourstore.com/collections/sale Semantic matching also catches variations like “clearance”, “discount”, “deals”, “what’s on sale”, etc.

How semantic matching works

Semantic redirects match on query intent rather than exact keywords. For example:
  • “need help” matches a redirect configured for “customer service”
  • “how do I return something” matches a redirect configured for “return policy”
  • “where can I get support” matches a redirect configured for “help”
Layers evaluates the semantic similarity between the search query and your configured redirect terms. It triggers the redirect when it finds a strong match. You don’t need to configure every possible variation, because semantic matching covers related concepts and intent. Queries that exactly match a configured term (ignoring letter case and extra whitespace) always trigger the redirect, with no AI matching involved. Exact matches work immediately after you save a redirect, in both search and autocomplete.

Testing redirects

Use the Test Text Search tool to verify your semantic redirects:
  1. Enter a search query that should trigger your redirect.
  2. Check the response for the _meta.redirect field.
  3. Verify the redirect URL is correct.
  4. Test variations of your target terms to confirm semantic matching works as expected.

Best practices

  • Use general terms — Configure redirects with broad, general terms rather than specific variations. Semantic matching handles related queries automatically.
  • Test thoroughly — Verify redirects work for expected queries and don’t trigger unexpectedly for product searches.
  • Monitor search analytics — Review which queries trigger redirects to identify gaps or opportunities for additional redirects.
  • Use absolute URLs — Always provide full URLs including the protocol (https://) so redirects work correctly.
  • Avoid over-redirecting — Don’t redirect queries that should show product results. Reserve redirects for informational queries, support requests, and specific landing pages.

Auto redirect

When the Layers storefront pixel or app block is installed, the pixel handles semantic redirects automatically. The pixel navigates the customer to the redirect URL without your frontend needing to process the _meta.redirect response. No configuration is required. For more details, see Semantic Redirects — Auto redirect.

Automatic page crawler

Besides the redirects you create manually, Layers includes an automatic page crawler. The crawler scans your Shopify pages daily and creates redirects for informational content like FAQs, return policies, shipping pages, and contact pages. Crawler-generated redirects appear in your Settings → Semantic Redirects list with a Crawler badge in the Source column. Manually created redirects display a Manual badge. You can edit or delete crawler-generated redirects the same way you manage manual ones. The crawler will not overwrite or conflict with your manual redirects. If you’ve already created a redirect for a particular page or term, the crawler skips it. For more details on how the crawler works and what pages it targets, see Semantic Redirects — Automatic page crawler.

Troubleshooting

Redirect not triggering:
  • Check that the redirect is enabled in Settings → Semantic Redirects
  • Test the query in the Test Text Search tool to see the API response
Wrong redirect URL:
  • Verify the URL is correct and uses the full absolute path
  • Check if another redirect with similar terms might be matching first
Redirect triggering for product searches:
  • Refine your search terms to be more specific to informational queries
  • Test with various queries to identify false positives
  • Consider using more specific terms that clearly indicate non-product intent
Crawler-generated redirect is incorrect:
  • Edit the redirect’s search terms or target URL in Settings → Semantic Redirects
  • Delete the redirect if it’s not relevant. The crawler will not recreate it for 30 days

See also