---
acl_categories:
- '@search'
arguments:
- name: alias
type: string
- name: index
type: string
categories:
- docs
- develop
- stack
- oss
- rs
- rc
- oss
- kubernetes
- clients
complexity: O(1)
description: Adds an alias to the index
group: search
hidden: false
linkTitle: FT.ALIASADD
module: Search
railroad_diagram: /images/railroad/ft.aliasadd.svg
since: 1.0.0
stack_path: docs/interact/search-and-query
summary: Adds an alias to the index
syntax_fmt: FT.ALIASADD alias index
title: FT.ALIASADD
---
Add an alias to an index
[Examples](#examples)
## Required arguments
alias index
is alias to be added to an index.
Indexes can have more than one alias, but an alias cannot refer to another
alias.
FT.ALIASADD allows administrators to transparently redirect application queries to alternative indexes.
## Examples
Add an alias to an index
Add an alias to an index.
{{< highlight bash >}}
127.0.0.1:6379> FT.ALIASADD alias idx
OK
{{< / highlight >}}
Attempting to add the same alias returns a message that the alias already exists.
{{< highlight bash >}}
127.0.0.1:6379> FT.ALIASADD alias idx
(error) Alias already exists
{{< / highlight >}}
## Redis Software and Redis Cloud compatibility
| Redis
Software | Redis Cloud
Flexible & Annual | Redis Cloud
Free & Fixed | Notes |
|:----------------------|:-----------------|:-----------------|:------|
| ✅ Supported | ✅ Supported | ✅ Supported | |
## Return information
{{< multitabs id="ft-aliasadd-return-info"
tab1="RESP2"
tab2="RESP3" >}}
One of the following:
* [Simple string reply]({{< relref "/develop/reference/protocol-spec#simple-strings" >}}): `OK` if executed correctly.
* [Simple error reply]({{< relref "/develop/reference/protocol-spec#simple-errors" >}}) in these cases: alias already exists, index does not exist.
-tab-sep-
One of the following:
* [Simple string reply]({{< relref "/develop/reference/protocol-spec#simple-strings" >}}): `OK` if executed correctly.
* [Simple error reply]({{< relref "/develop/reference/protocol-spec#simple-errors" >}}) in these cases: alias already exists, index does not exist.
{{< /multitabs >}}
## See also
[`FT.ALIASDEL`]({{< relref "commands/ft.aliasdel/" >}}) | [`FT.ALIASUPDATE`]({{< relref "commands/ft.aliasupdate/" >}})