SEO

Rank Math WordPress Plugin Duplicate Sitemap Bug

The popular WordPress SEO plugin, Rank Math, has been discovered to have a bug that causes duplicate sitemap files to be generated. This weird error in how sitemaps are generated is similar to the one affecting Yoast, but the way Rank Math handles it is different.

Site site map

A sitemap is an important part of search engine optimization. It tells search engines which pages have been newly added to the site and which pages have been updated.

A sitemap helps a search engine prioritize crawling of its website by alerting it to new content that needs to be indexed.

Because a sitemap is so important to SEO, it is a good practice to have your sitemaps created properly.

Google Developer page About sitemaps says:

“a Site Map A file in which you provide information about the pages, videos, and other files on your site and the relationships between them.

Search engines like Google read this file to crawl your site more efficiently.

A sitemap tells Google which pages and files it thinks are important on your site, and provides valuable information about those files. For example, when the page was last updated and which versions of the page are in an alternate language.

XML math classification sitemap error

Rank Math also generates multiple XML sitemaps. In fact, you are likely to create an infinite number of XML sitemaps.

For example, a site with a single sitemap for “posts” will generate the following duplicate sitemaps:

/post-sitemap.xml

/post-sitemap1.xml

But it will not create the zero-numbered variable, /post-sitemap0. xml

The same is true for duplicate sitemaps created for pages:

/page-sitemap.xml
/page-sitemap1.xml

And again, just like Posts sitemaps, Rank Math does no Create a zero-numbered sitemap variable: /page-sitemap0. xml

Math ranking generates an infinite number of sitemaps?

Although Rank Math does not generate a zero-numbered sitemap variant, Rank Math does generate what appears to be an infinite number of numbered XML sitemaps.

Ideally, Rank Math should generate a 404 response code for non-existent sitemaps.

But what seems to happen is that instead of generating a 404 response message, Rank Math generates a 200 response code (meaning it’s a request for a valid webpage) and then generates an empty XML sitemap.

The following is a URL I tested to see what Rank Math generated:

https://rankmath.com/post-sitemap9.xml

This is what Rank Math shows:

Non-existent sitemap created by Rank Math

How many sitemaps will Rank Math generate?

Apparently, Rank Math might generate a lot of URLs, possibly an infinite number of XML sitemap pages.

I was able to create an empty sitemap with this URL:

https://rankmath.com/post-sitemap9999999999999999999999999999999999999999999.xml

What matters in the above sitemap is that the server generates 200 header response codes to a browser when the XML sitemap is served.

A response code of 200 means that there is no error.

I checked if Rank Math generated a 200 response code across HTTPStatus Web site.

This shows that Rank Math generates 200 response codes for non-existent pages:

Math header response code rank

Math ranking sitemap redirecting behavior

Other SEO components have a bug that creates a duplicate sitemap when the number zero is added to the end of the sitemap URL.

However, Rank Math does not generate a zero-numbered duplicate sitemap.

When a request is made for a non-existent zero-numbered sitemap, the request causes a redirect to the underlying sitemap.

Request for sitemap not found:

/page-sitemap0.xml

Redirects to the basic sitemap:

/page-sitemap. xml

But it can be argued that this is not a correct way to deal with a non-existent sitemap.

The correct server response should be to show a 404 Page Not Found Error Response message, because that’s what happened, the page was not found.

The Yoast SEO plugin responds the right way by serving a 404 response code for non-existent XML sitemaps (except for zero and numeric 1 variables).

I asked Rank Math about it and they explained it was not a problem at all.

Mathematics order:

This is similar to how WP core handles site search: you will receive an HTTP 200 response for any random search query.

Unlike some sitemap plugins, Rank Math does not create actual sitemap files in the root directory of the server.

Since the non-existent URLs for these sitemaps are not located anywhere on the site, they will never be crawled by Google and other search engines, so this shouldn’t cause any problem from an SEO point of view.”

Math order duplicate sitemap error

Interestingly, Rank Math, like some SEO plugins, has a duplicate sitemap error.

When it comes to optimizing a website for search engines, the goal is to be as perfect as possible. Anything that makes a website less than perfect can be considered a mistake when perfection is the goal.

Less-than-perfect optimization can lead to unexpected consequences.

Yost is aware of the problem and is said to be working on a fix. One would hope that the duplicate sitemap issue with Rank Math will also be fixed at some point.

the quote:

Read Google’s webpage about sitemaps

Learn about sitemaps

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button