Skip to content
FunnelGuard

Fix guide by FunnelsGuard

Duplicate sitemaps from Yoast and Rank Math: how to fix it

SEO-113Low impactOther toolBy FunnelGuardPublished Updated
On this page

What this issue is

An XML sitemap is a file that lists the pages you want search engines to find. Yoast SEO and Rank Math are both WordPress plugins that create one for you. If both are active, each tries to publish its own.

Typical addresses are /sitemap_index.xml (both plugins use this name, so one may override the other or they may clash) and /wp-sitemap.xml (the sitemap built into WordPress 5.5 and later). Sometimes one plugin's sitemap is silently replaced by the other, and sometimes both respond with different content.

Why it costs you leads or sales

The direct harm is usually small. Search engines cope with duplicate sitemaps and will not penalise you for them. The cost is indirect and shows up as noise and mistakes.

What can go wrong
  • The two sitemaps disagree, so a page you set to noindex in one plugin still appears in the other.
  • Search Console reports are harder to read when several sitemaps list the same URLs.
  • You may submit the wrong sitemap and never notice that new pages are missing from it.
  • Two plugins also tend to output two sets of titles, meta descriptions and schema, which is a bigger SEO problem than the sitemap itself.
How duplicate sitemaps cause confusion
  1. Two SEO plugins activeYoast and Rank Math both enabled
  2. Two sitemaps publishedDifferent URL lists and settings
  3. Mixed signals to crawlersNoindex pages may still be listed
  4. Harder to diagnose indexingReports show overlapping URLs

Two plugins feed two sitemaps, so the signals a crawler receives can conflict.

How to check if your site has it

Check for duplicate sitemaps
  1. Check the plugin listWordPress

    In WordPress go to Plugins > Installed Plugins and see whether both Yoast SEO and Rank Math SEO are active.

  2. Open the common sitemap URLs

    Visit yourdomain.com/sitemap_index.xml, yourdomain.com/sitemap.xml and yourdomain.com/wp-sitemap.xml. Note which ones load and what they list.

  3. Read the page source

    Open the sitemap and view source. Yoast sitemaps link to an XSL style sheet and show a comment mentioning Yoast; Rank Math shows its own name in the page title or comments.

  4. Check robots.txt

    Open yourdomain.com/robots.txt and look at the Sitemap: lines. More than one line pointing at different files is a sign of duplication.

  5. Check Search Console

    Under Indexing > Sitemaps, see which sitemaps are submitted and whether more than one is listed.

Quick command line check of the common sitemap URLsbash
for p in sitemap_index.xml sitemap.xml wp-sitemap.xml; do
  echo "== $p"
  curl -sIL https://example.com/$p | grep -iE '^(HTTP|location)'
done

How to fix it

The best fix is to run only one SEO plugin. If you must keep both for a short time while you migrate, turn off the sitemap feature in the one you are retiring.

Fix by platform
  1. Decide which plugin stays

    Pick the plugin that holds your current titles, redirects and schema settings. Export or note the settings of the other first.

  2. Switch off the other sitemap

    In Rank Math go to Rank Math SEO > Sitemap Settings and turn off the sitemap, or open Rank Math SEO > Dashboard and disable the Sitemap module. In Yoast go to Yoast SEO > Settings > Site features (older versions: Features) and turn off XML sitemaps.

  3. Better: deactivate the unused plugin

    Rank Math has an import tool (Rank Math SEO > Status & Tools > Import & Export) that can bring in Yoast data. After importing and checking your pages, deactivate the plugin you no longer use.

  4. Save and clear caches

    Save permalinks under Settings > Permalinks, then clear any caching plugin or CDN cache so the old sitemap URLs stop being served.

Disable the core WordPress sitemap (wp-sitemap.xml)php
add_filter( 'wp_sitemaps_enabled', '__return_false' );
Tidy up Search Console after the fix
  1. Pick the one sitemap URL

    Usually https://yourdomain.com/sitemap_index.xml.

  2. Remove old submissions

    In Search Console, open Indexing > Sitemaps and remove sitemap URLs that no longer exist.

  3. Submit the remaining sitemap

    Add the single sitemap URL and check that its status says Success.

  4. Repeat in Bing Webmaster Tools

    Do the same there if you use it.

How to confirm it's fixed

Confirmation checks
  • Only one SEO plugin is active under Plugins > Installed Plugins.
  • /sitemap_index.xml loads and lists your post types, pages and categories.
  • /wp-sitemap.xml returns a 404 (if you disabled it) or redirects to your main sitemap.
  • robots.txt contains one Sitemap: line, or lines that all point to the same sitemap.
  • Search Console shows one submitted sitemap with a Success status.
  • A page set to noindex does not appear in the sitemap.

How to prevent it happening again

Habits that keep it clean
  • Use one SEO plugin per site and write down which one it is.
  • When switching plugins, import settings, test, then deactivate the old one the same day.
  • Review installed plugins before and after any agency handover or site migration.
  • Re-check your sitemap URLs after major plugin updates.
  • Keep a note of the single sitemap URL in your site documentation.
Common sitemap URLs and where they come from
URLUsually created byKeep?
/sitemap_index.xmlYoast SEO or Rank MathYes, from one plugin only
/sitemap.xmlOften redirects to the indexFine if it redirects
/wp-sitemap.xmlWordPress coreDisable if a plugin handles it

How FunnelGuard handles this

FunnelGuard does not check for duplicate sitemaps today. It is a possible future check, not a current feature.

What FunnelGuard does do is run your real customer journeys, such as lead forms, checkouts and booking buttons, on a schedule, and check the steps, the tracking hits and whether test leads arrive. That covers revenue-critical paths rather than sitemap setup.

To watch for this issue yourself, add a quarterly reminder to open your sitemap URLs and check the plugin list. You can also use Google Search Console's Sitemaps report, or a crawler such as Screaming Frog, to see whether more than one sitemap is being read. A free read-only FunnelGuard website audit is available if you want a broader look at your site.

Questions people ask

Can I use Yoast and Rank Math at the same time?

You can, but you should not. Both add titles, meta tags, schema and sitemaps, so they overlap and conflict. Keep one and deactivate the other.

Why do I have two sitemaps on my WordPress site?

Most often two SEO plugins are active, such as Yoast and Rank Math, and each builds a sitemap. The built-in WordPress sitemap at /wp-sitemap.xml can also exist alongside a plugin sitemap.

Will duplicate sitemaps hurt my Google rankings?

Not directly. Google handles duplicate sitemaps without a penalty. The risk is conflicting settings, such as noindex pages still listed, and the wider clash from running two SEO plugins.

How do I turn off the Yoast sitemap?

In WordPress go to Yoast SEO > Settings > Site features and switch off XML sitemaps. Older versions place this under Features. Then clear your cache and check the sitemap URL.

How do I disable the Rank Math sitemap?

Go to Rank Math SEO > Sitemap Settings and turn the sitemap off, or disable the Sitemap module on the Rank Math dashboard. Then clear caches and recheck your sitemap URLs.

Which sitemap should I submit to Google Search Console?

Submit only the one from the SEO plugin you keep, usually https://yourdomain.com/sitemap_index.xml. Remove any other sitemap URLs that no longer exist.

Should I disable the WordPress core sitemap, wp-sitemap.xml?

If an SEO plugin provides your sitemap, yes, it avoids a second competing one. Most SEO plugins do this automatically, but you can force it with the wp_sitemaps_enabled filter.

Does FunnelGuard catch this?

Other tool

Needs a different kind of tool.

Stop finding out from your customers

FunnelGuard runs your real forms and checkouts on a schedule, checks the tracking and the leads behind them, and alerts you once, with a screenshot. Try any paid plan free for 3 days.