30 days free. No credit card. Full access from the moment you connect your site.

Start free trial

Get Rank Math Redirection Stats

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

Abilityrank-math/get-redirection-stats
ToolsetRank Math — toolset/rank-math
GroupRank Math › Redirections & 404s
RequiresRank Math SEO, active on the site
Capabilitymanage_options
SafetyRead-only — changes nothing
RepeatableIdempotent — running it twice leaves the same result
Ships inAcrossAI 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

NameTypeWhat it is
countsobjectHow many rules are active, inactive and trashed.
hitsobjectHit statistics across the table.
successbooleanWhether the call completed.
messagestringA one-line summary of what happened, suitable for showing a human.
error_codestringPresent 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


Get the plugins:
AcrossAI Abilities Manager · AcrossAI MCP Manager

Browse the rest: Every ability, by category


Keep reading