A sitemap that covers every corner of the site, automatically
XML Sitemap builds a complete sitemap index covering every registered post type, taxonomy, and author archive, respects noindex settings from Yoast or RankMath, and keeps itself current the moment content changes — without waiting for a manual regeneration.
- Covers any registered post type and taxonomy, not just the defaults.
- Automatically excludes posts marked noindex by Yoast or RankMath.
- Cache clears itself precisely when the relevant content changes.
- Auto-splits into multiple files once a section passes 500 URLs.
Include Post Types
Options
What does XML Sitemap do?
When the xml_sitemap module is active, TOWP_Xml_Sitemap serves a sitemap index at /sitemap_index.xml, with individual sitemap files for every configured post type, taxonomy, and author archive at addresses like /sitemap-page.xml. A post marked noindex by Yoast SEO or RankMath is automatically excluded, and a post can be excluded individually through a checkbox on its own editor screen. Since output is cached for twelve hours and invalidated precisely when the relevant content actually changes, search engines never fetch a sitemap that's genuinely stale.
Without a sitemap, discovery is left to chance
Since nothing tells a search engine exactly what exists on a site, new or updated content can take far longer to get noticed.
A generic sitemap misses what makes a site actually different
Custom post types, custom taxonomies, and author pages are exactly the content a default or bare-bones sitemap tends to leave out, even though they're often central to what a site is actually built around.
A stale sitemap actively works against fresh content
A sitemap that isn't updated the moment content changes can point search engines at outdated information, or simply miss what was published most recently.
Every URL covered, kept current automatically
The module builds a genuinely complete sitemap and keeps it accurate without any manual regeneration step.
Every post type and taxonomy, not just the defaults
Custom post types and custom taxonomies, including ones registered by other plugins, appear as their own configurable options.
Respects noindex from other SEO plugins
A post marked noindex in Yoast or RankMath gets excluded automatically, so the sitemap never contradicts another plugin's own settings.
Self-updating, down to what actually changed
Editing a post clears only that post type's cache, not the entire sitemap, so search engines see fresh content without unnecessary regeneration elsewhere.
Complete coverage, engineered carefully
Every capability below is present in the supplied PHP class and its settings registration.
Reads whatever is actually registered
The available options adapt to every post type and taxonomy the site has registered, including custom ones added by other plugins, rather than a fixed list.
500 URLs per file, indexed together
Once a post type or taxonomy passes 500 entries, the module automatically splits it into multiple numbered sitemap files, all listed in the index.
Never contradicts another plugin's SEO settings
A post flagged noindex through either plugin's own postmeta is excluded from the sitemap query directly, at the database level.
A checkbox right on the editor screen
Any individual post or page can be excluded from the sitemap through a dedicated meta box, without affecting anything else in that post type.
Only what actually changed gets cleared
Saving a post clears that post type's cache, its taxonomies' caches if term counts might have shifted, and author caches only if that setting is active, rather than wiping everything.
Existing Sitemap lines removed first
Any prior Sitemap directive in robots.txt, including WordPress core's own default, gets removed before this module's own line is added, avoiding duplicate or conflicting entries.
Where a complete sitemap helps most
The module supports any site whose content goes beyond a handful of standard pages and posts.
Sites built on custom post types and taxonomies
Get a sitemap that actually reflects what the site is built around, not just its posts and pages.
Sites that publish frequently and want fast discovery
Keep search engines pointed at current content without waiting for a manually triggered sitemap rebuild.
Large sites with content spread across many URLs
Let the sitemap split itself automatically as the site grows, instead of hitting an unexpected limit in a single file.
Accurate, complete, and genuinely current
The module combines broad content coverage with cache behavior built specifically around correctness.
Built to avoid the N+1 query trap
The verified implementation goes out of its way to batch database work rather than repeating it per item.
Bulk cache priming before the loop
Post and attachment caches get primed for an entire page of results in one or two bulk queries, avoiding a separate database hit for every single URL and image.
Batched lastmod lookups for terms and authors
The most recent modification date for every term or author on a page is fetched in one grouped query, rather than one query per entry.
Generated only when actually requested
Sitemap XML is built only when a sitemap URL is visited, cached for twelve hours, and never generated as part of a normal page load.
Read-only output, carefully authorized controls
The code publishes existing public content and protects the few actions that can change it.
A discovery mechanism, not an access control
The sitemap only lists URLs that are already publicly reachable; it doesn't expose anything a visitor couldn't already find.
The manual cache-clear action is properly authorized
The Flush Cache button is protected by both a nonce check and a manage_options capability check before anything gets cleared.
The per-post exclude checkbox is nonce-verified
Saving the exclusion setting on a post checks a nonce and the current user's edit_post capability before making any change.
Configuration requires the same access as any other setting
Choosing which post types and taxonomies to include happens through the standard TheOneWP settings screen, available only to an administrator.
Built directly around WordPress's own rewrite and post APIs
The supplied code integrates through APIs present in WordPress core; this page makes no compatibility claim beyond the verified implementation.
add_rewrite_rule()
The native WordPress function used to register the sitemap_index.xml and per-type sitemap addresses as real, routable URLs.
wp_sitemaps_enabled filter
The native WordPress filter used to disable WordPress's own built-in sitemap when this module's replacement is preferred.
robots_txt filter
The native WordPress filter used to add a single Sitemap directive to robots.txt, after removing any existing ones.
TheOneWP versus common alternatives
Compare the verified XML Sitemap implementation with a typical default-only sitemap.
| Capability | TheOneWP XML Sitemap | Other common solutions |
|---|---|---|
| Post type and taxonomy coverage | Any registered type, including custom ones | Often limited to WordPress's own default posts, pages, categories and tags |
| Other SEO plugin compatibility | Respects Yoast and RankMath noindex automatically | Some approaches can list a URL another plugin has deliberately hidden |
| Cache invalidation | Precisely scoped to whatever actually changed | Often a full rebuild on any content change, regardless of what changed |
| Large-site handling | Automatic splitting at 500 URLs per file | Some approaches generate one unbounded file, risking size or timeout issues |
| robots.txt integration | A single canonical directive, duplicates removed | Duplicate or conflicting Sitemap lines are a common oversight |
Set up a complete sitemap in four steps
Confirm the sitemap URL loads correctly before considering the setup finished.
Enable XML Sitemap
Activate the module from the TheOneWP SEO settings tab.
Choose post types, taxonomies, and options
Select which content types, taxonomies, and extras like featured images or author archives should be included.
Disable the WordPress default sitemap, if replacing it
Turn on Disable WordPress built-in sitemap to avoid publishing two competing sets of addresses.
Visit the sitemap URL to confirm
Open the Sitemap URL shown in settings and confirm it lists the expected content, split into files as needed.
Include only what search engines should actually find
A sitemap works best when it reflects exactly the content meant to be discovered.
Only include post types genuinely meant to be discovered
A post type used purely for internal data, like templates or components, may be worth leaving out of the sitemap entirely.
Use the per-post exclude checkbox for occasional exceptions
Rather than removing an entire post type, exclude a single page or post directly when only that one item shouldn't appear.
Disable the WordPress default sitemap once this one is configured
Running both at once means two different sets of addresses get published for the same content.
Use the manual Flush Cache button after a bulk content change
A large import or bulk edit is a reasonable moment to clear the cache immediately rather than waiting for the normal invalidation to catch up.
Avoid a couple of details worth getting right
A few behaviors are easy to misunderstand the first time through.
Running two sitemaps at once without realizing it
Leaving WordPress's built-in sitemap active alongside this one publishes two different addresses for the same content; disable the default if this module is meant to replace it.
Expecting a noindexed post to reappear immediately after removing the flag
Since results are cached, a post that just had noindex removed may take up to the cache duration to appear, unless the cache is flushed manually.
Leaving every available post type checked without reviewing them
Not every registered post type is meant for public discovery; review the list rather than enabling everything by default.
XML Sitemap FAQ
These answers come directly from the verified class and its settings registration.
What does XML Sitemap do?
It builds a sitemap index at /sitemap_index.xml with a separate sitemap for each post type, taxonomy, and author archive, kept current automatically as content changes.
Which post types and taxonomies get included?
Any registered post type or taxonomy can be included, not just posts, pages, categories, and tags; the list adapts to whatever the site actually has registered, including custom ones.
Does this respect noindex settings from Yoast or RankMath?
Yes. A post marked noindex in either plugin is automatically excluded, so the sitemap never contradicts another plugin's SEO settings.
Can I exclude a single post or page from the sitemap?
Yes. A checkbox on the post or page editor screen excludes that specific item without affecting anything else.
How is the sitemap kept up to date?
Cached output clears automatically and specifically for whatever changed, whenever a post is saved, deleted, or a term is created, edited, or deleted.
Does this work alongside WordPress's own built-in sitemap?
It can replace it. A separate toggle disables WordPress's native sitemap to avoid publishing two competing sets of addresses.
What happens with very large sites?
Sitemaps are automatically split into multiple files of up to 500 URLs each, listed together in the sitemap index, matching standard sitemap protocol limits.
Does this affect page load performance for visitors?
No. Sitemap generation only runs when a sitemap URL is actually requested, and the result is cached for twelve hours.
Can I manually clear the sitemap cache?
Yes. A Flush Cache button on the settings screen clears all cached sitemap data immediately.
Who can configure the XML Sitemap settings?
Only an administrator with access to the TheOneWP settings screen.
Stop leaving search engines to guess what's on the site.Give them a complete, self-updating sitemap.
Use XML Sitemap to cover every post type, taxonomy, and author archive, with automatic cache invalidation and compatibility with existing SEO plugin settings.

