They play an essential role in WordPress SEO by telling Google and friends what pages to crawl.
When they work, we love them. When they don’t, well, just thinking about all that lost traffic makes us shake our fists and want to smash our keyboards.
My WordPress Sitemap isn’t working, what do I do?
So you’re running a WordPress site and you got a faulty sitemap that’s not working?
There are a lot of different reasons why a sitemap might not function correctly in WordPress.
Some are technical, such as issues with an integrated WordPress ache plugin like WP Super Cache or developer code that went a little awry in its implementation.
Others could be much more mundane, such as having an out of date plugin generating your sitemap, or even something as simple as the box for sitemaps being unchecked by accident.
However, if you’re running a WordPress site and having issues with the sitemap that’s being generated, I’m willing to bet that it’s a plugin conflict issue.
I’ve had tons of issues with sitemaps over the years, and from my own experience (not to mention what I’ve read from browsing around the net), I’m gonna say this is one of the top culprits for faulty sitemaps.
What plugins are causing my sitemap to malfunction?
Now don’t get me wrong. Both of these are great plugins. Yoast is the most popular WordPress SEO plugin for a reason, and Google XML Sitemaps does a great job at, well, making sitemaps.
The issue is when you have both of them installed and activated at the same time. The reason for this is because Yoast has a built-in sitemap feature.
If you try to activate two different sitemap plugins, your site simply won’t know what to do with itself.
What seems to happen is that one sitemap becomes static, frozen, while each time you try to update it causes a duplicate sitemap or backup to be created in your root directory.
The problem here is that the one frozen in time, never updating or completing itself, is the one bots will crawl and not the other file.
Fixing this is fairly simple, if not exactly straightforward.
Just going into your WordPress backend and disabling one of the two conflicting sitemaps won’t solve the issue. Neither will deactivating one of your plugins.
You’ll notice if you have Yoast installed and Google XML Sitemaps too, and you disable the latter, the conflict will persist in your sitemap file.
The only solution as far as I know is to delete one of the plugins. Not disable, actual DELETE.
In my case, when this happened to me, Google XML Sitemaps and then installed Yoast and didn’t even notice the issue for months. It was only when I replaced Yoast with the SEO Framework did I realize how bugged my sitemap was.
So if you’re in the same situation try:
- Double check to see if you have two plugins that both generate XML sitemaps.
- Disable / un-check all your sitemap creation tools.
- Delete one of the plugins. If you’re running Yoast, I would recommend deleted Google XML Sitemaps simply because it affects less of your posts.
- Reactive one sitemap tool.
- Refresh your page and maybe even clear your browser’s cache just to be sure.
- Verify that your sitemap is now correct and voila!
An optional step, in case your issue lasted for an extended period of time, is to re-submit your sitemap.xml file to your Google Search Console. That way Google will be able to discover all the “lost” pages that might not have been getting crawled or indexed correctly.
Of course, if you’re not sure where to look for your Yoast sitemap in the first place, try this:
Open WordPress and find Yoast:
Next, go to features:
Third, scroll down and see if Sitemaps is activated.
Hope this helps. If it does (or doesn’t), leave a comment below and let others know.