Yoast WordPress SEO Bug Creates Duplicate Sitemaps
A sharp-eyed search marketer noticed that Yoast was generating duplicate sitemaps. It’s unclear how long this has been happening, but the SEO manager at Yoast acknowledged the bug and noted that Yoast is aware of the issue and says they’re working on a fix.
However, once this duplicate sitemap bug was discovered, checking other SEO plugins revealed that a similar issue occurs with other plugins as well, but is not endemic to all of them. SEO plug-ins.
Yoast SEO sitemap bug discovered
Brenda Malone (@_brendamalone) discovered the bug and tweeted to Yoast about it:
@yoast @jonoalderson Is there a way to disable duplicate xml sitemaps created by Yoast?
page .com/page-sitemap.xml and
Is there a specific reason why these are created? Thank you.
— Brenda Malone, Triple-Vaxxed and Still Masking (@_brendamalone) March 21, 2022
Someone from Yoast replied that they were aware of the bug and reported it internally to fix it:
Hey @_brendamaloneThe simplest solution for now might be to configure redirect from version ‘1’ to simple version (for each affected message type).
In the meantime, I’ve certainly seen a ticket in our internal tracker to resolve this issue, so I’ll see if I can find it and dust it off.
— Jono Alderson (@jonoalderson) March 21, 2022
Yoast SEO Sitemap
The Yoast SEO sitemap feature automatically generates a sitemap for different post types.
For example, a site with a sitemap for pages will post a sitemap URL like this:
A site that doesn’t have thousands of posts will have a posting sitemap like this:
A site with lots of posts might publish sitemaps that look like this:
Yoast duplicate sitemap bug
What was discovered is that Yoast also generates duplicate sitemaps.
A site that only has one sitemap for “pages” will have the following sitemaps:
Yoast “Page” Sitemaps Bug
Original “Page” sitemap:
Duplicate “Page” Sitemaps:
Yoast “Post” sitemap bug
A site that only has one sitemap for posts will have the following sitemap:
Map of the original “Post” site:
Duplicate “Post” sitemaps:
Yoast Multiple Sitemaps for Publications
A site with multiple sitemaps for posts manifests the bug in a different way.
For example, if a site has thousands of posts and requires three sitemaps, their sitemaps might look like this:
Original “Posts” sitemaps:
/post-sitemap1.xml /post-sitemap2.xml /post-sitemap3.xml
But with the Yoast sitemap bug, they now have two additional sitemaps which are duplicates of the first sitemap.
So in the example above, this is the first sitemap: /post-sitemap1.xml
Here are the duplicate sitemaps of the original first sitemap:
Yoast Sitemap Bug is live at Yoast.com
The bug can be seen on any site that uses the Yoast SEO WordPress plugin, including Yoast itself.
These URLs lead to identical Yoast XML sitemaps:
https://yoast.com/post-sitemap.xml https://yoast.com/post-sitemap0.xml https://yoast.com/post-sitemap1.xml
Sitemap bug is not limited to Yoast
What’s really weird is that this sitemap bug is not limited to Yoast.
A similar bug can be found in many other SEO plugins (but not all).
It’s a bit weird that several SEO plugins show similar behavior when it comes to a bug.
Something to consider is that plugin makers are bound by the WordPress open source license which dictates that plugins and themes for WordPress are considered derivative works. This is a long-standing issue that was at some point clarified by Matt Mullenweg himself in 2015.
“WordPress is under a license called the GPL, which basically says you can do whatever you want with the software, but if you distribute modifications or create derivative works, they must also be under the GPL. Think of it as a Creative License Commons Sharealike.
In the past, people didn’t know if themes for WordPress were derivative works and needed to be GPLed. In 2009 we received an outside legal opinion that clarified the issue saying that PHP in themes should definitely be GPLed, and for CSS and images it was optional. Basically, everyone in the WP community is fully GPLed, sometimes called 100% GPLed, for all files needed to run their theme (PHP, JS, CSS, artwork).
So it may be that some approaches to generating a sitemap are themselves open source and available to all SEO plugin companies, which may explain why other SEO plugins contain the same or similar bug as Yoast.
Sitemap bug affects other SEO plugins
This sitemap bug doesn’t just affect Yoast and Rank Math. This also affects other SEO plugins.
This bug has been confirmed on the following SEO plugins:
- Ranking math SEO plugin
- WordPress SEOPress SEO Plugin
- AllineOneSEO WordPress SEO Plugin
If your SEOPress sitemap for “articles” starts like this:
Duplicates are generated on these URLs:
AllineOneSEO WordPress SEO Plugin
If your AIOSEO plugin generates this URL for “posts” sitemaps:
It also generates these:
The above is also true for the Rank Math plugin.
WordPress Sitemap Bugs Are Not Everywhere
Brenda Malone investigated this issue and shared that some SEO plugins don’t seem to contain this bug.
The following SEO plugins correctly generate sitemaps:
- WordPress SEO Ultimate PRO Plugin
- THIN SEO
- Squirly SEO
How big is a problem?
The best practice for SEO is to make things easier for search engines.
The more errors introduced, the more likely it is that search engine crawlers will start to stumble over errors and generate unforeseen problems, especially if that problem is compounded by other errors on a site.
The meaning of SEO is search engine optimization. The easier you make it for the search engine to crawl and discover web pages, the better it is for SEO.
Errors are the opposite of optimization. The more errors a website generates, the less optimized it is.
In terms of SEO, an argument can be made to minimize the effect of these errors and say that yes, the site can continue to limp and function normally despite these errors.
But errors are always the opposite of SEO.