Easily Disable the Default Sitemap in WordPress by two ways

How to easily disable the default WordPress sitemap ?

Do you want to disable the default WordPress sitemap on your website ?

Introduced in WordPress 5.5, the default sitemap feature enables WordPress to automatically publish XML Sitemaps for your website . The challenge is that this feature lacks the advanced WordPress SEO features you need to get a higher ranking.

In this article, we’ll show you how to easily disable the WordPress sitemap and improve it with a more powerful solution.

Why you should disable the WordPress sitemap ?

An XML Sitemap file is a file that lists all the contents of your website in XML format, making it easier for search engines to discover and index your content.

Sitemaps are very useful for your website because they bring more traffic and improve the SEO rankings of your site.

However many plugins for WordPress SEO such as All in One SEO, Yoast SEO and Google XML Sitemaps already implement sitemaps on your website, resulting in two sets of sitemaps in WordPress pages.

Duplicate sitemaps of the same WordPress page can confuse search engines and can drop your SEO rankings.

If you do not use an SEO ( Search Engine Optimization ) extension for your Sitemap file, you lose advanced features .

For example, many popular WordPress SEO plugins offer features such as video sitemap, news Sitemap, RSS sitemap, etc .

That you need to outperform your competitors in SEO .

As With that being said, Let’s see how you can easily disable the default WordPress sitemap .

The first way : disable the WordPress sitemap using the WordPress SEO plugin

If you use any of the popular WordPress SEO plugins, they will automatically disable the default WordPress sitemap feature and replace it with a more powerful solution.

For the sake of this tutorial, we will show the extension AIOSEO because it is this plugin that we use in Dr-wp.

All in One SEO is the best WordPress SEO plugin that allows you to easily optimize your WordPress site for search engines and social media platforms.

More than 3 million websites use AIOSEO including ours.

By default, All in One SEO will enable their Sitemap feature which automatically replaces the basic WordPress sitemaps when activated.

The first thing you need to do is install and activate the AIOSEO plugin . For more details, please see our guide on how to WordPress plugins .

Once activated, you will need to configure the AIOSEO plugin.

After that, head to the All in One SEO >> sitemaps page from the WordPress admin control panel to review the sitemap settings .

Next, go to the “general sitemap“tab. Here, be sure to set the Enable sitemap>> key to  >>active .

This will disable the default WordPress sitemap .

How to easily disable the default WordPress sitemap ?

Apart from the general sitemap, we recommend that you enable video sitemap, news sitemap as well as RSS sitemap

on your site to increase SEO rankings .

The second way : disable the WordPress sitemap using code Snippet

You can also easily disable the default WordPress sitemap using the code as well. You can add the code snippet in the jobs file.the PHP of the template .

However, the biggest problem is adding the code to the jobs file.php is that even a simple mistake can break your website.

That’s why we recommend using WPCode to add custom code to WordPress. This free plugin makes it easy to add code snippets in WordPress without having to modify the jobs file.the PHP of the template.

First, you need to install and activate the free WPCode plugin .

After that, go to the new code Snippets entry in the right menu of your WordPress dashboard. This will take you to the “All snippets”page.

After that, just click on the “add new”button.

default WordPress sitemap

WPCode will then take you to the “add snippet” page where you can choose to add your own custom code or search to find an existing snippet from the wpcode library.

Since we have to add a custom code, just hover over the option “add custom code” and click “use snippet”.

How to disable WordPress sitemap ?

Now you will be directed to the “create custom code”page. You can start by typing a name for your code snippet. It can be anything you like.

Then Select” icon type ” from the drop-down menu on the right. Since we will be using the PHP icon, just click on the “PHP Snippet”option.

snippet sitemap ?

After that, just copy and paste the following PHP code snippet into the “code Preview”.

add_filter( 'wp_sitemaps_enabled', '__return_false' );

It will seems like this when you do it .

code preview

After pasting the code, scroll down to the “insert” section where you will find two ways to insert.

Just select the “auto-insert” option because you want to turn it on at the site level.

Now, go to the top of the page, switch the switch from “inactive” to “active” in the upper right corner

, And then click the “save Snippet“button.

Once you have saved and activated the code snippet, it will be active and the default WordPress sitemap is disabled.

We hope this article helped you learn how to deactivate Google sitemap .


Previous post
Web site creation series secound lesson
Next post
14 of the best SEO plugins and tools that you should use it

Leave a Reply