rank-math/get-sitemap-status returns live Rank Math sitemap state: module status, which post types and taxonomies are included, whether the sitemap_index.xml rewrite rule is actually persisted, whether the file cache is enabled, and a live fetch of the index.
Use it when the sitemap 404s despite looking correctly configured.
At a glance
| Ability | rank-math/get-sitemap-status |
| Toolset | Rank Math — toolset/rank-math |
| Group | Rank Math › Sitemaps & llms.txt |
| 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
The sitemap is served by a rewrite rule, and rewrite rules are persisted in an option rather than recomputed on every request. A rule that was never flushed into that option does not exist as far as WordPress is concerned.
So the module reports itself active, the settings are correct, every post type is included — and the URL returns a 404, because nothing routes it.
That situation is essentially undiagnosable from the admin, which shows configuration rather than routing. Checking whether the rule is persisted answers it in one field.
The fix is rank-math/set-module-state, which refreshes rewrite rules as part of changing module state — toggling the sitemap module off and on again regenerates the rule.
The live fetch is the confirmation. Configuration can be right and the served output still wrong if the file cache is holding an older version.
Input
This ability takes no input.
What comes back
| Name | Type | What it is |
|---|---|---|
module_active | boolean | Whether the sitemap module is on. |
included | object | Which post types and taxonomies are in the sitemap. |
rewrite_rule_present | boolean | Whether the rule is actually persisted. |
cache_enabled | boolean | Whether sitemap files are cached. |
index | string | A live fetch of the sitemap index. |
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:
Our sitemap returns a 404 but it looks configured — why?
It resolves to one call:
{
"ability": "rank-math/get-sitemap-status",
"parameters": {}
}Worth knowing
- A missing rewrite rule is the usual cause of a 404 on a correctly configured sitemap.
- The live fetch catches a stale file cache that configuration checks cannot.
- Fix the rule by toggling the module, which refreshes rewrite rules.
Related abilities
- Set Rank Math Module State — the fix for a missing rule
- List Rank Math Sitemap URLs — what is actually advertised
- Invalidate Rank Math Sitemap Cache — clear a stale cache
Get the plugins:
AcrossAI Abilities Manager · AcrossAI MCP Manager
Browse the rest: Every ability, by category