{
  "schema_version": 2,
  "id": "commands/client-getredir",
  "title": "CLIENT GETREDIR",
  "url": "https://redis.io/docs/latest/commands/client-getredir/",
  "summary": "Returns the client ID to which the connection's tracking notifications are redirected.",
  "since": "6.0.0",
  "tags": [
    "docs",
    "develop",
    "stack",
    "oss",
    "rs",
    "rc",
    "oss",
    "kubernetes",
    "clients"
  ],
  "last_updated": "2026-09-18T09:48:21+01:00",
  "page_type": "content",
  "content_hash": "4a656a977adcfbd3f656f12b19491787020dc66e9eb0f63c59364073f2029861",
  "sections": [
    {
      "id": "overview",
      "title": "Overview",
      "role": "overview",
      "text": "This command returns the client ID we are redirecting our\n[tracking](https://redis.io/docs/latest/develop/clients/client-side-caching#tracking) notifications to. We set a client\nto redirect to when using [`CLIENT TRACKING`](https://redis.io/docs/latest/commands/client-tracking) to enable tracking. However in\norder to avoid forcing client libraries implementations to remember the\nID notifications are redirected to, this command exists in order to improve\nintrospection and allow clients to check later if redirection is active\nand towards which client ID."
    },
    {
      "id": "redis-software-and-redis-cloud-compatibility",
      "title": "Redis Software and Redis Cloud compatibility",
      "role": "content",
      "text": "| Redis<br />Software | Redis<br />Cloud | <span style=\"min-width: 9em; display: table-cell\">Notes</span> |\n|:----------------------|:-----------------|:------|\n| <span title=\"Not supported\">&#x274c; Standard</span><br /><span title=\"Not supported\"><nobr>&#x274c; Active-Active</nobr></span> | <span title=\"Not supported\">&#x274c; Standard</span><br /><span title=\"Not supported\"><nobr>&#x274c; Active-Active</nobr></span> |  |"
    },
    {
      "id": "return-information",
      "title": "Return information",
      "role": "returns",
      "text": "**RESP2:**\n\nOne of the following:\n* [Integer reply](../../develop/reference/protocol-spec#integers): `0` when not redirecting notifications to any client.\n* [Integer reply](../../develop/reference/protocol-spec#integers): `-1` if client tracking is not enabled.\n* [Integer reply](../../develop/reference/protocol-spec#integers): the ID of the client to which notification are being redirected.\n\n**RESP3:**\n\nOne of the following:\n* [Integer reply](../../develop/reference/protocol-spec#integers): `0` when not redirecting notifications to any client.\n* [Integer reply](../../develop/reference/protocol-spec#integers): `-1` if client tracking is not enabled.\n* [Integer reply](../../develop/reference/protocol-spec#integers): the ID of the client to which notification are being redirected."
    }
  ],
  "examples": []
}
