rank-math/get-redirection-stats returns redirection counts by status — active, inactive, trashed — alongside hit statistics.
It sizes the problem before you page through it.
At a glance
| Ability | rank-math/get-redirection-stats |
| Toolset | Rank Math — toolset/rank-math |
| Group | Rank Math › Redirections & 404s |
| Requires | Rank Math SEO, active on the site |
| Capability | manage_options |
| Safety | Read-only — changes nothing |
| Repeatable | Idempotent — running it twice leaves the same result |
| Ships in | AcrossAI Abilities Manager 0.0.34 and later |
How it works
Redirection tables grow without anybody deciding to grow them. Every migration, every restructure, every post whose slug changed adds rules, and nothing ever removes them.
The counts by status tell you which kind of cleanup is needed. A large trashed count means rank-math/delete-trashed-redirections has work to do and somebody already decided those rules were finished. A large inactive count means rules were switched off and left, which is a different and less finished decision.
The hit statistics are the other half. Zero-hit rules are the candidates for removal, and knowing how many there are before listing them decides whether this is a five-minute job or an afternoon.
On a large table, reading this first is the difference between a targeted cleanup and paging through three thousand rules.
Input
This ability takes no input.
What comes back
| Name | Type | What it is |
|---|---|---|
counts | object | How many rules are active, inactive and trashed. |
hits | object | Hit statistics across the table. |
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:
How many redirects do we have, and how many are dead?
It resolves to one call:
{
"ability": "rank-math/get-redirection-stats",
"parameters": {}
}Worth knowing
- Read this before paging through a large redirection table.
- A large trashed count is a decision already made; a large inactive count is not.
- Zero-hit rules are the removal candidates.
Related abilities
- List Rank Math Redirections — then page through them
- Empty Rank Math Redirection Trash — act on the trash count
Get the plugins:
AcrossAI Abilities Manager · AcrossAI MCP Manager
Browse the rest: Every ability, by category