Redirect is our new functionality for customizing Search.
It allows you to create a direct connection between a query or keyword and a specific url. When can you use it?
For example, you have a stand-alone product for one category, and you want to make it possible for your costumers to directly search for the product page from the search, without passing by the search page.
This guide will be divided into two sections. The first one is to show you how to create a Redirect for your store and the second part the additional steps you will have to follow if you have a custom API store.
How to Create a Redirect
To create a redirect you simply have to go to my.clerk.io and from there:
1. Go to Search -> Redirects -> Create new redirect.
2. Insert the URL of the product or web page you want your costumers to be sent to, once they press enter in the search bar of your store. Then click Create Redirect.
3. Add a new Query.
4. Select between Matches Exactly or Contains.
5. At this point you only have to write the Query your customers will use when they are looking for the product or the page which URL you wrote before. You can add as many queries as you need for the specific URL. Then click on Update Redirect.
Additional Steps for Your Custom API Store
If you own a Custom platform with an API solution you will need to follow the first part of the guide and then add these few steps to create the parameters you need to create the Redirect.
1. Create an API call by using our references you can find here: https://docs.clerk.io/reference#search-search
2. Insert the public and private API keys of your shop and use the query that you wrote in my.clerk.io. It should look something like this:
3. Copy your API call in the browser of your choice. In the API response you will find the parameter Redirect which you will need to implement the redirect functionality on your website.