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

Start free trial

Get Rank Math Sitemap Status

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

Abilityrank-math/get-sitemap-status
ToolsetRank Math — toolset/rank-math
GroupRank Math › Sitemaps & llms.txt
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

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

NameTypeWhat it is
module_activebooleanWhether the sitemap module is on.
includedobjectWhich post types and taxonomies are in the sitemap.
rewrite_rule_presentbooleanWhether the rule is actually persisted.
cache_enabledbooleanWhether sitemap files are cached.
indexstringA live fetch of the sitemap index.
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:

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


Get the plugins:
AcrossAI Abilities Manager · AcrossAI MCP Manager

Browse the rest: Every ability, by category


Keep reading