Ever since WordPress 5.5 rolled out, every site comes with a built in XML sitemap. On the surface, that sounds great, but if you’re serious about SEO, you probably already use a powerful SEO plugin that generates its own, much better sitemap. This creates two roadmaps pointing to the same place, which can confuse search engines.
Learning how to properly disable WordPress sitemaps is a crucial step for clean technical SEO. In most cases, your SEO plugin will handle this for you automatically. If not, you can disable it by adding the add_filter( 'wp_sitemaps_enabled', '__return_false' ); code snippet to your site. This guide will walk you through why it’s important and exactly how to do it.
Why You Might Need to Disable WordPress Sitemaps
While the default WordPress sitemap is a decent starting point, it’s pretty basic. For most website owners, keeping it active alongside a more advanced one from an SEO plugin is not a good idea.
Here are the main reasons you’d want to disable WordPress sitemaps:
- Redundancy with SEO Plugins: If you use popular plugins like Yoast SEO, Rank Math, or All in One SEO, you have a sitemap conflict waiting to happen. These plugins create their own superior sitemaps, making the default WordPress one redundant.
- Avoiding Search Engine Confusion: Having two sitemaps (one at
wp-sitemap.xmland another at a plugin URL likesitemap_index.xml) can send mixed signals to Google. This could lead to inefficient crawling or delays in getting your new content indexed. - Lacking Advanced Features: The core sitemap is barebones. It doesn’t support specialized sitemaps for images, videos, or Google News. SEO plugins, on the other hand, often include these, giving you a competitive edge.
- Gaining More Control: SEO plugins give you easy options to exclude specific posts, pages, or archives from your sitemap. With a content mapping approach, you can decide what deserves to be indexed and keep low‑value pages out of sight. Achieving this with the default sitemap requires custom code.
In short, if you’re using an SEO plugin, the default sitemap becomes unnecessary. Disabling it cleans up your technical SEO and lets your more powerful plugin do its job without interference.
How to Disable WordPress Sitemaps with an SEO Plugin
This is by far the easiest method. In fact, you probably don’t have to do anything at all.
Most major SEO plugins are smart enough to know that two sitemaps are a bad idea. When you activate their sitemap feature, they automatically disable the default WordPress sitemap for you.
- All in One SEO (AIOSEO): When you enable the AIOSEO sitemap, it automatically deactivates the WordPress core sitemap to prevent any conflicts.
- Yoast SEO: As of version 14.7, Yoast SEO also automatically disables the default sitemap, replacing it with its own “richer and more powerful” version.
- Rank Math: This plugin follows the same logic, taking over sitemap duties and disabling the core functionality to avoid duplicate issues.
The takeaway is simple: if you have a modern SEO plugin installed and its sitemap feature is on, it’s almost certainly handling this for you. No extra steps are needed.
How to Disable WordPress Sitemaps Using Code
If you don’t use a major SEO plugin or you want to ensure the default sitemap is gone for good, you can easily disable WordPress sitemaps with a single line of code.
This is the official method recommended by WordPress developers. You just need to add the following snippet to your site:
add_filter( 'wp_sitemaps_enabled', '__return_false' );
This code snippet uses a filter hook to tell WordPress to turn off its sitemap generation completely. But where do you put this code? You have a couple of options.
Understanding the wp_sitemaps_enabled Filter
Before we add the code, let’s quickly understand what it does. The wp_sitemaps_enabled filter is a core WordPress function that acts as an on/off switch for the sitemap feature. By default, it returns true, keeping sitemaps active. Our code snippet simply hooks into this filter and forces it to return false, turning the entire feature off.
Interestingly, WordPress uses this same logic internally. If you check the box to “Discourage search engines from indexing this site” in your Reading Settings, WordPress automatically sets this filter to false in the background.
Using functions.php vs. a Must Use Plugin
You have two primary places to add your code snippet:
- Your Theme’s functions.php File: This is the most common method. You can edit your active theme’s
functions.phpfile and paste the code at the end. The downside is that this change is tied to your theme. If you ever switch themes, the code will be gone, and the default sitemap will pop back up. Be careful, as a typo in this file can break your site. - A Must Use Plugin (MU Plugin): This is a more robust, professional approach. MU plugins are loaded automatically by WordPress before regular plugins and themes. By creating a simple PHP file with the code snippet and placing it in the
wp-content/mu-plugins/directory, you ensure the sitemap is disabled permanently, regardless of what theme you use. This method is theme independent and a safer way to manage sitewide code.
For most users, relying on an SEO plugin is best. If you need to use code, a code snippets plugin or creating a simple must use plugin is safer than editing functions.php directly. After deploying the change, run a quick technical SEO audit to confirm crawlability and indexation are healthy. If this feels too technical, it’s the kind of task an SEO service can handle in minutes. The experts at Rankai regularly perform these types of technical fixes to ensure clients’ sites are perfectly optimized.
How to Verify and Troubleshoot Your Sitemap Status
After you disable WordPress sitemaps, you need to make sure it actually worked. A quick check can prevent future headaches.
Verify the Sitemap is Off at /wp-sitemap.xml
The default WordPress sitemap lives at yourdomain.com/wp-sitemap.xml. To verify it’s disabled, simply visit that URL.
- If it’s disabled correctly, you should see a 404 “Page not found” error or an empty XML file. This is a good sign, it means search engines can no longer find it.
- If it’s still active, you’ll see an XML index listing your posts, pages, and categories. This means the disabling method didn’t work, and you need to try again.
Next, check that your SEO plugin’s sitemap is working. The URL is often yourdomain.com/sitemap_index.xml or yourdomain.com/sitemap.xml. As long as that one is active and the wp-sitemap.xml is not, your setup is correct—and it’s a good moment to run through an on-page SEO checklist to make sure titles, meta robots, and canonical tags aren’t undermining indexation.
How to Resolve a Duplicate Sitemap Conflict
What if you find that both your plugin’s sitemap and the default WordPress sitemap are active? This duplicate conflict needs to be resolved.
- Choose One Sitemap: In nearly every case, you should stick with the sitemap from your SEO plugin. It’s more powerful and configurable.
- Disable the Other: Follow the steps outlined above to disable the WordPress sitemaps using either a plugin setting or the code filter.
- Check for Plugin Bugs: In the past, bugs in popular plugins have accidentally caused duplicate sitemaps. The first step in troubleshooting is to ensure your SEO plugin is updated to the latest version, as a fix may have already been released—then monitor your SEO results over the next few days to confirm crawling and indexation rebound.
- Consider a Redirect: As a temporary fix, you can redirect the
wp-sitemap.xmlURL to your plugin’s sitemap URL using a 301 redirect. This is a temporary patch, not a permanent solution. The best approach is to fully disable the unused sitemap.
Fixing these technical issues is crucial for a healthy SEO foundation. If you’re tired of chasing down technical gremlins, a done for you service might be the answer. The team at Rankai includes technical SEO fixes as part of their flat monthly fee, taking the burden off your shoulders.
The Benefits of Disabling the Unnecessary WordPress Sitemap
Taking a few minutes to clean up your sitemap configuration has several clear benefits for your site’s performance.
- Clearer Signals for Search Engines: With only one authoritative sitemap, you remove any potential confusion for search engine crawlers, which helps your SEO.
- Improved Crawl Efficiency: Search engine bots can use their limited crawl budget more effectively when they have a single, clean roadmap to follow—backed by thoughtful internal linking. This can lead to faster indexing of your new content.
- Access to Advanced Features: By relying on an SEO plugin, you unlock advanced sitemap options for video, news, and images that can help you outrank competitors.
- Simplified Management: You only have one sitemap to monitor in Google Search Console, which streamlines your workflow and makes troubleshooting easier.
- Technical Peace of Mind: Proactively removing a point of potential conflict ensures your site’s SEO foundation is solid. It’s one less thing to worry about.
Ultimately, when you properly disable WordPress sitemaps you aren’t just removing a file, you’re ensuring your site communicates with search engines as clearly and efficiently as possible. If you’re running SEO yourself, follow a realistic step‑by‑step plan to keep execution consistent.
Frequently Asked Questions
Do I need to disable the WordPress sitemap if I use Yoast?
No. If you are using a recent version of Yoast SEO (14.7 or newer) with its XML sitemap feature enabled, it automatically disables the default WordPress sitemap for you.
What happens if I have two sitemaps?
Having two sitemaps can confuse search engine crawlers, potentially leading to inefficient crawling and slower indexing of your new or updated pages. It’s always best to have one primary sitemap.
Is it bad to have no sitemap at all?
While search engines can still find your pages without a sitemap, having one is highly recommended for SEO. It helps ensure all your important content is discovered and indexed, especially for large or new websites or teams scaling with programmatic SEO.
Where do I find the WordPress default sitemap?
The default sitemap index is located at the URL yourdomain.com/wp-sitemap.xml. If you have the feature enabled, visiting this address will show you the XML file.
Can I disable WordPress sitemaps without a plugin?
Yes, you can add a simple code snippet (add_filter( 'wp_sitemaps_enabled', '__return_false' );) to your theme’s functions.php file or a must use plugin to disable the core sitemap functionality.
Why is the WordPress default sitemap considered basic?
The default sitemap lacks advanced features found in SEO plugins. For example, it does not create separate sitemaps for images or videos and offers limited user friendly controls for excluding specific content.