A WordPress site can end up generating sitemaps from three different sources: WordPress core’s /wp-sitemap.xml, an SEO plugin’s sitemap, and occasionally a caching or multilingual plugin’s sitemap variant. When all three are alive, Google Search Console submits the one you registered, but the bots crawl whichever they find first via robots.txt or autodiscovery. The symptom is the Search Console coverage report disagreeing with the actual indexable URL count.
What’s happening
Since WordPress 5.5, core ships a basic XML sitemap at /wp-sitemap.xml. Yoast, Rank Math, AIOSEO, and SEOPress each replace it with their own at /sitemap_index.xml or /sitemap.xml — but only if the plugin’s “disable core sitemap” hook fires correctly. On a WordPress site with security plugin override, a must-use plugin enabling wp_sitemaps_enabled, or a theme that registers its own sitemap, you end up with multiple endpoints all returning XML. Each one references a different subset of content, has different priority tags, and updates on a different cadence.
How to verify
From any host with curl:
curl -sI https://example.com/sitemap_index.xml
curl -sI https://example.com/sitemap.xml
curl -sI https://example.com/wp-sitemap.xml
curl -s https://example.com/robots.txt | grep -i sitemap
curl -s https://example.com/wp-sitemap.xml | head -20
curl -s https://example.com/sitemap_index.xml | head -20
robots.txt should point at exactly one sitemap URL. All other endpoints should return 404 or 301 to the canonical one. From WordPress, check which plugin owns the sitemap:
wp eval 'echo apply_filters("wp_sitemaps_enabled", true) ? "core sitemap on" : "core sitemap off";'
wp plugin list --status=active --field=name | grep -iE 'seo|sitemap'
If core sitemap is “on” and an SEO plugin is also active, you have a conflict.
The fix
-
Pick one canonical sitemap. On any WordPress site running an SEO plugin (Yoast, Rank Math, AIOSEO, SEOPress), the SEO plugin’s sitemap wins. Disable core’s: add to
wp-config.phpor a must-use plugin:add_filter('wp_sitemaps_enabled', '__return_false');Stack Harbor’s enterprise WordPress hosting baseline includes this as a permanent mu-plugin so plugin updates can’t re-enable core’s sitemap.
-
Audit
robots.txt. Edit via your SEO plugin’s robots.txt editor (Yoast > Tools > File Editor, Rank Math > Tools, etc.). Verify exactly oneSitemap:line, pointing at the canonical URL. MultipleSitemap:lines are technically valid but confuse the operator more than they help search engines. -
Verify in Google Search Console. Settings > Crawl stats > Sitemaps. There should be exactly one submitted sitemap with a recent “Last read” date. Old submissions for
/sitemap.xml.gzor other legacy paths should be deleted from GSC. -
Multilingual plugin sitemaps. WPML, Polylang, and TranslatePress each add per-language entries to the SEO plugin’s sitemap rather than generating their own. Confirm:
curl -s https://example.com/sitemap_index.xml | grep -c '<sitemap>'should show more entries on a multilingual site than the same plugin would on a monolingual one. If you see two completely separate sitemap roots, the multilingual integration didn’t load. -
Caching plugin sitemap exclusion. WP Rocket, LiteSpeed Cache, and W3 Total Cache can be configured to cache the sitemap, which is bad — search engines re-fetch sitemaps to detect changes, and a 24h cache hides new content. Exclude sitemap URLs from page cache: WP Rocket > Advanced > Never Cache URLs > add
/sitemap*.xml. Stack Harbor’s enterprise WordPress hosting baseline ships with this exclusion preconfigured. -
Multisite networks. Each site in a WordPress multisite generates its own sitemap. The main site sitemap should NOT include subsite URLs. If you see them merged, a network-active SEO plugin is misconfigured — set scope to per-site.
-
301 the obsolete endpoints. Once you’ve picked the canonical sitemap, add
.htaccessrewrites so the old endpoints return 301 to the new one. This kills any external references that linger after the switch.
Stack Harbor manages sitemap configuration as part of enterprise WordPress hosting baselines. Start the conversation when Search Console and your WordPress sitemap disagree.