In short. Return false for the users provider through wp_sitemaps_add_provider to remove author archive URLs from WordPress core sitemaps.
Definition: As of October 2026, WordPress documents removal of author archive URLs from its core XML sitemaps through the
wp_sitemaps_add_providerfilter. Its example returnsfalsewhen the provider name isusers.
Key facts
- The WordPress core team's XML sitemaps documentation identifies separate providers for posts, taxonomies and users, and gives a filter example for removing the users provider.
- The WP_Sitemaps_Users source code creates sitemap entries using
get_author_posts_url(), which supplies author archive URLs. - Google's noindex documentation describes an indexing control delivered through a meta tag or HTTP response header, with crawler access required for it to work.
What does the users provider include?
A sitemap provider is the component responsible for supplying sitemap entries and their pagination. WordPress's users provider reference names this component WP_Sitemaps_Users, with the provider name users and object type user.
Its default query selects authors with published posts in public post types. The code removes attachment and page from those post types before building the query. The resulting entries use get_author_posts_url() to supply each author's archive URL. The wp_sitemaps_users_query_args filter allows developers to change that query.
Which filter removes all user archives?
The core team's removal example uses this PHP callback:
add_filter(
'wp_sitemaps_add_provider',
function( $provider, $name ) {
if ( 'users' === $name ) {
return false;
}
return $provider;
},
10,
2
);
The callback receives the provider object and its name. The conditional returns false for users; for other names, it returns the provider object unchanged. This removes the users provider as a whole, so individual author IDs are unnecessary.
The same core documentation uses different filters, wp_sitemaps_post_types and wp_sitemaps_taxonomies, for selecting post types or taxonomies within their respective providers.
How can the change be checked?
WordPress's core documentation locates the sitemap index at the following path:
/wp-sitemap.xml
That index lists the site's sitemap pages. After the filter runs, checking this index for the removal of the users sitemap verifies the intended output change. Other providers pass through the callback unchanged, so their sitemap listings remain eligible for inclusion.
Does sitemap removal exclude archives from Google Search?
The callback changes sitemap provider registration. For search exclusion, Google's noindex guidance specifies a rule on the page or its HTTP response. For an HTML author archive, the documented meta tag belongs in the page's head section:
<meta name="robots" content="noindex">
Google requires the page to remain accessible to its crawler so it can read the rule. Sitemap removal and a page's indexing directive therefore require separate checks.
Related terms
- XML sitemap
- Where is the built-in WordPress XML sitemap?
- How do I exclude a post type from WordPress core sitemaps?
- noindex
FAQ
Can I remove users while keeping post sitemaps?
Yes. The core example checks specifically for users and returns the original provider for other names.
Why are some accounts absent before I add the filter?
The default users query selects authors with published posts in supported public post types. It excludes pages and attachments from those post types, and the wp_sitemaps_users_query_args filter can modify its arguments.
Sources
- WordPress Core, "New XML Sitemaps Functionality in WordPress 5.5", 22 July 2020
- WordPress Developer Resources, "WP_Sitemaps_Users", undated
- Google Search Central, "Block Search indexing with noindex", 10 December 2025
Check how a page reads to answer engines. Open the GEO score analyzer