rank-math/update-redirection edits an existing redirection in place, keeping its ID, hit count and creation date.
Supply only the fields you want to change.
At a glance
| Ability | rank-math/update-redirection |
| Toolset | Rank Math — toolset/rank-math |
| Group | Rank Math › Redirections & 404s |
| Requires | Rank Math SEO, active on the site |
| Capability | manage_options |
| Safety | Writes data |
| Repeatable | Idempotent — running it twice leaves the same result |
| Ships in | AcrossAI Abilities Manager 0.0.34 and later |
What delete-and-recreate loses
The obvious way to change a redirection is to delete it and make a new one. That works, and it discards the hit count and the creation date along the way.
Those are the two fields that make a redirection table maintainable. The hit count is how you tell a rule that is doing work from one that has been dead for two years; the creation date is how you tell which migration a rule belongs to. Reset them and the whole table becomes undifferentiated.
On a site with a few hundred rules accumulated over years, that history is the only thing standing between a cleanup and guesswork.
Rank Math checks whether a source would resolve to its own destination, because a redirection that points at itself is an infinite loop and the browser gives up with an error rather than a page.
A change that would create one is refused outright here rather than saved inactive — because unlike a creation, an update that silently deactivates an existing working rule takes something away.
Idempotent.
Input
| Name | Type | Required | What it is |
|---|---|---|---|
id | integer | Yes | The redirection ID. |
sources | array | No | Replace the source rules. |
destination | string | No | Change the destination. |
status_code | integer | No | Change the HTTP status. |
status | string | No | Change the active state. |
What comes back
| Name | Type | What it is |
|---|---|---|
redirection | object | The rule after the edit. |
success | boolean | Whether the call completed. |
message | string | A one-line summary of what happened, suitable for showing a human. |
error_code | string | Present only on failure — a stable machine-readable reason, such as a missing field, a wrong field type or an unmet confirmation. |
Example
Ask your assistant:
Point the /old-pricing redirect at the new plans page instead.
It resolves to one call:
{
"ability": "rank-math/update-redirection",
"parameters": {
"id": 44,
"destination": "/plans"
}
}Worth knowing
- Preserves the hit count and creation date. Delete-and-recreate does not.
- A change that would create a loop is refused, and nothing is saved.
- Partial — unsent fields are untouched.
- Idempotent.
Related abilities
- List Rank Math Redirections — find the ID
- Change Rank Math Redirection Status — just switch it off
Get the plugins:
AcrossAI Abilities Manager · AcrossAI MCP Manager
Browse the rest: Every ability, by category