rank-math/update-sitemap-settings writes Rank Math sitemap settings: items per page, image inclusion and the post and term exclusion lists under scope=general, or whether a given post type or taxonomy appears in the XML and HTML sitemaps under scope=post-type and scope=taxonomy.
This changes configuration only. Follow it with rank-math/invalidate-sitemap-cache for the change to appear.
At a glance
| Ability | rank-math/update-sitemap-settings |
| Toolset | Rank Math — toolset/rank-math |
| Group | Rank Math › Settings |
| Requires | Rank Math SEO, active on the site |
| Capability | manage_options |
| Safety | Writes data |
| Repeatable | Not idempotent — each call changes the row set, so re-running is not a no-op |
| Ships in | AcrossAI Abilities Manager 0.0.34 and later |
How it works
The cache is the reason for the second step. When sitemap file caching is on, the served sitemap is whatever was generated last, and a configuration change does not regenerate it.
So a post type excluded here keeps appearing in the served sitemap until the cache is cleared — which looks exactly like a setting that did not save.
Excluding a post type from the sitemap is not the same as noindexing it. The sitemap is a suggestion about what to crawl; the robots directives decide what gets indexed. A page removed from the sitemap and still linked from the site will still be found.
Items per page matters on large sites: too many and the sitemap files become slow to generate and large to fetch; too few and there are thousands of them.
The exclusion lists take IDs. A post excluded by ID stays excluded even if it moves post type.
Submitting a field that does not belong to the panel rejects the whole write, so rank-math/get-settings comes first: it lists the field IDs the panel accepts, with their types, allowed values and bounds.
Input
| Name | Type | Required | What it is |
|---|---|---|---|
scope | string | Yes | general, post-type or taxonomy. |
object | string | Required for post-type and taxonomy scopes | Which post type or taxonomy. |
settings | object | Yes | A map of field ID to value. |
What comes back
| Name | Type | What it is |
|---|---|---|
updated | array | The fields that changed. |
settings | object | The scope after the write. |
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:
Take products out of the sitemap.
It resolves to one call:
{
"ability": "rank-math/update-sitemap-settings",
"parameters": {
"scope": "post-type",
"object": "product",
"settings": { "pt_product_sitemap": "off" }
}
}Worth knowing
- Clear the sitemap cache afterwards or the change will not appear.
- Sitemap exclusion is not noindex. A linked page is still found.
- Exclusion lists take IDs.
- Items per page is a real trade-off on large sites.
Related abilities
- Invalidate Rank Math Sitemap Cache — the required second step
- Get Rank Math Sitemap Status — read the current inclusion
- List Rank Math Sitemap URLs — confirm the served result
Get the plugins:
AcrossAI Abilities Manager · AcrossAI MCP Manager
Browse the rest: Every ability, by category