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

Start free trial

Invalidate Sitemap Cache

seo/invalidate-sitemap clears Yoast’s cached sitemap so the next request rebuilds it.

Pass a type to clear just that one, or omit it to clear everything.

At a glance

Abilityseo/invalidate-sitemap
ToolsetYoast SEO — toolset/yoast-seo
GroupYoast SEO › XML Sitemaps
RequiresYoast SEO, active on the site
Capabilitymanage_options
SafetyWrites data
RepeatableIdempotent — running it twice leaves the same result
Ships inAcrossAI Abilities Manager 0.0.34 and later

How it works

Yoast caches sitemap pages because generating them is expensive on a large site — each page is a query over a content type with its modification dates.

The cache is invalidated automatically when content changes through the normal paths. What it does not catch is everything else: a bulk import, a permalink structure change, a direct database update, a migration.

After any of those the sitemap keeps serving the old URLs, which is worse than serving nothing — search engines are being handed a list of pages that 404.

Clearing one type is the right move when only one type was affected. On a site with a hundred thousand posts, clearing everything means every sitemap page regenerates on demand, which is real work.

Idempotent.

Input

NameTypeRequiredWhat it is
typestringNoA post type or taxonomy name. Omit to clear the whole sitemap cache.

What comes back

NameTypeWhat it is
clearedstringWhat was cleared.
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:

We changed the permalinks — clear the sitemap cache.

It resolves to one call:

{
  "ability": "seo/invalidate-sitemap",
  "parameters": {}
}

Worth knowing

  • Normal content edits invalidate automatically. Imports and migrations do not.
  • A stale sitemap hands search engines a list of URLs that 404.
  • Clear one type when only one changed.
  • Idempotent.

Related abilities


Get the plugins:
AcrossAI Abilities Manager · AcrossAI MCP Manager

Browse the rest: Every ability, by category


Keep reading