{
  "schema_version": 2,
  "id": "develop/reference/errors/common/moved",
  "title": "MOVED error",
  "url": "https://redis.io/docs/latest/develop/reference/errors/common/moved/",
  "summary": "The key belongs to a hash slot that another cluster node serves.",
  "tags": [
    "docs",
    "develop",
    "stack",
    "oss",
    "rs",
    "rc",
    "oss",
    "kubernetes",
    "clients"
  ],
  "last_updated": "2026-11-02T15:10:28+01:00",
  "page_type": "content",
  "content_hash": "dae655c602f7d9fd54fa9729fc93c40c1865b9cef1454a59550080a4fbeb4a55",
  "sections": [
    {
      "id": "overview",
      "title": "Overview",
      "role": "overview",
      "text": "A Redis cluster returns this error when you send a command to a node that doesn't serve the key. The error tells you which node does. A client that supports clusters reads the error, sends the command again to the right node, and updates its map of the cluster.\n\nA cluster splits keys into 16384 hash slots, and each primary node serves some of the slots. The error gives the key's slot number and the address of the node that serves it:\n\n[code example]\n\nIn redis-py, this error is `MovedError: 12182 127.0.0.1:6463`."
    },
    {
      "id": "example",
      "title": "Example",
      "role": "example",
      "text": "[code example]"
    },
    {
      "id": "how-to-fix-it",
      "title": "How to fix it",
      "role": "content",
      "text": "- **Your client doesn't support clusters.** Use a cluster client, which follows `MOVED` errors for you. For example, in redis-py, use `RedisCluster` instead of `Redis`. See [Connect to a Redis cluster](https://redis.io/docs/latest/develop/clients/redis-py/connect#connect-to-a-redis-cluster).\n- **You're using `redis-cli`.** Add the `-c` option, so `redis-cli` follows the error to the right node: `redis-cli -c -h <host> -p <port>`.\n\nSee [MOVED redirection](https://redis.io/docs/latest/operate/oss_and_stack/reference/cluster-spec#moved-redirection) in the cluster specification."
    }
  ],
  "examples": [
    {
      "id": "overview-ex0",
      "language": "plaintext",
      "code": "MOVED 12182 127.0.0.1:6463",
      "section_id": "overview"
    },
    {
      "id": "example-ex0",
      "language": "plaintext",
      "code": "> GET foo\n(error) MOVED 12182 127.0.0.1:6463",
      "section_id": "example"
    }
  ]
}
