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

Start free trial

Delete Rank Math 404 Log Entries

rank-math/delete-404-logs permanently deletes specific 404 log entries by ID. It refuses without confirm: true.

The usual reason is housekeeping after creating a redirection for them.

Before you run it

The entries and their hit counts cannot be recovered. The hit count is the evidence that a URL mattered, and once it is gone there is no way to establish how much traffic a redirect is carrying. Clear entries after you have acted on them, not instead of acting.

At a glance

Abilityrank-math/delete-404-logs
ToolsetRank Math — toolset/rank-math
GroupRank Math › Redirections & 404s
RequiresRank Math SEO, active on the site
Capabilitymanage_options
SafetyDestructive — deletes stored values, and refuses to run without confirm: true
RepeatableIdempotent — running it twice leaves the same result
Ships inAcrossAI Abilities Manager 0.0.34 and later

How it works

A 404 log that is never cleared becomes useless. The entries you have already dealt with sit at the top by hit count forever, and the new ones — the ones that represent something that just broke — are buried below them.

So clearing handled entries is real maintenance rather than tidiness. The log is only useful if it reflects what is currently broken.

The order matters: create the redirection first, verify it works, then clear the log entry. Clearing first loses the record of what the URL was and how much traffic it carried, which is exactly what you need if the redirect turns out to be wrong.

To clear the entire log rather than specific entries, rank-math/run-maintenance-tool with tool=delete_log does that.

Idempotent.

Input

NameTypeRequiredWhat it is
idsarrayYesThe log entry IDs to delete.
confirmbooleanYes — must be trueThe irreversibility gate. Without it the call is refused before anything is touched.

What comes back

NameTypeWhat it is
deletedarrayThe IDs removed.
countintegerHow many.
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:

Clear the 404 entries I just made redirects for.

It resolves to one call:

{
  "ability": "rank-math/delete-404-logs",
  "parameters": {
    "ids": [881, 882],
    "confirm": true
  }
}

Worth knowing

  • Redirect first, verify, then clear. Not the other way round.
  • The hit count is the evidence, and it goes too.
  • The whole log is cleared by a maintenance tool, not here.
  • Idempotent.

Related abilities


Get the plugins:
AcrossAI Abilities Manager · AcrossAI MCP Manager

Browse the rest: Every ability, by category


Keep reading