Search Redirects
When a customer searches for a term that has a clear destination — like "black friday" going to /sale, or "boots" going to a boots collection — Shopify's default search results are rarely the best experience. This tool lets you map specific search terms to specific URLs, so those searches become instant redirects instead.
Build your rules, export the JSON, and deploy via a shop metafield and a single Shopify section.
Open tool →Map specific search queries to any destination URL. Multiple terms can share one URL.
Add, edit, and delete rules in one place. Sort, filter, and remove duplicates easily.
Exports a grouped JSON array ready to paste directly into the shop metafield.
Save your work as a .blink-redirects.json file and reload it any time.
Enter a search term and a redirect URL, then click + Add entry. Add one row per search term. Terms that should redirect to the same URL can be added as separate rows — the tool automatically groups them on export.
The right-hand panel shows the exported JSON in the format the Shopify section expects: an array of objects, each with a terms array and a url. Click copy to copy it to your clipboard.
In Shopify admin, go to Settings → Custom data → Shops and add a metafield definition if it doesn't exist yet:
blinksearch_redirectsThen go to Settings → Custom data → Shops → [your store], find the blink.search_redirects field, and paste in the copied JSON.
Copy the section code below into a new file in your theme at sections/blink-search-redirects.liquid. Then in the Shopify theme editor, open your Search template and add the Search Redirects section. Make sure it is set to Enabled.
Search for one of your mapped terms on the storefront. You should be redirected to the destination URL immediately. If it doesn't redirect, check that the metafield is saved as valid JSON and the section is enabled.
Save this as sections/blink-search-redirects.liquid in your theme, then add it to the Search template.
{% if section.settings.enabled %}
{%- assign redirects_data = shop.metafields.blink.search_redirects -%}
{%- if redirects_data != blank -%}
<script>
window.addEventListener('DOMContentLoaded', function() {
var searchTerms = "{{ search.terms | downcase }}";
var redirects = {{ redirects_data.value | json }};
redirects.forEach(function(entry) {
entry.terms.forEach(function(term) {
if (searchTerms.includes(term)) {
window.location.replace(entry.url);
}
});
});
});
</script>
{%- endif -%}
{% endif %}
{% schema %}
{
"name": "Search Redirects",
"settings": [
{
"type": "checkbox",
"id": "enabled",
"label": "Enabled",
"default": true
}
],
"presets": [
{
"name": "Search Redirects"
}
]
}
{% endschema %}
| downcase filter and checks whether each term appears anywhere in the query using .includes(). This means a term of chelsea will match searches for "chelsea boots", "chelsea shoes", and "chelsea" — but also "chelsea clinton". Keep terms specific enough to avoid unintended matches.blink.search_redirects metafield. No theme changes needed..blink-redirects.json file. Load it back in whenever you need to make changes.