> For the complete documentation index, see [llms.txt](https://docs.search.io/documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.search.io/documentation/fundamentals/search-settings/redirects.md).

# Redirects

{% hint style="info" %}
Redirects don't require a pipeline step to operate. They automatically take effect in autocomplete pipelines.
{% endhint %}

## Prerequisite <a href="#prerequisite" id="prerequisite"></a>

This feature requires the following versions of the search widget or frontend libraries:

* [React-Hooks 3.6.0](https://www.npmjs.com/package/@search.io/react-hooks) or later.
* [JS SDK 2.4.0](https://www.npmjs.com/package/@search.io/sdk-js) or later.

Please read the [upgrade instructions](https://search-io.atlassian.net/wiki/spaces/KB/pages/1529479185/How+to+upgrade+the+search+integration+search-widgets+or+sdk-react) for details.

## Setting up a redirect <a href="#setting-up-a-redirect" id="setting-up-a-redirect"></a>

#### Redirect for specific search terms <a href="#redirect-for-specific-search-terms" id="redirect-for-specific-search-terms"></a>

To add a redirect, navigate to *Redirects* and click the **Add redirect** button.

![](/files/C4WMwZsWS8Phz8ectMn0)

Specify a *trigger* for your redirect using Search.io's filter expressions. Specific search terms are the most commonly used trigger. For example, in the screenshot above, we check whether the search query `q` includes any of the words *shoes, boots, or heels*. Instead of showing search results, we will redirect the user to a category page with the URL `https://myshop.com/shoes`.

#### Redirect based on custom properties <a href="#redirect-based-on-custom-properties" id="redirect-based-on-custom-properties"></a>

In addition to redirecting specific queries, you can also check for variables passed into the search query. Variables enable you to personalize when to trigger a redirect.

> **Only available in advanced mode**
>
> Since Search.io doesn't know what variables might be passed into the query ahead of time, you will have to edit the condition in *advanced mode*. To enter advanced mode, click on the filter icon and refer to the [Filter expressions](/documentation/fundamentals/filter-expressions.md) documentation for syntax details.

For example, to create a redirect based on location:

`q ~ 'tv' AND country = 'Australia'`

or club membership:

`q ~ 'tv' AND clubMember = 'TRUE'`


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.search.io/documentation/fundamentals/search-settings/redirects.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
