My sitemap is giving a 404 error, what should I do?

Last update: 04 March, 2017
First of all, let us be clear that this is usually not due to our plugin, but due to poorly coded themes and/or other plugins

A 404 error basically means that the sitemap does not exist for a variety of reasons.

1
Sometimes resetting the permalink structure will quickly solve a 404 error from a recent change to your installation. Go to Admin > Settings > Permalinks and click save without altering anything. (How to Guide available here.)
2
Check that items exist in order to create the sitemap. For example, a category sitemap requires categories with published content. If the items does not exist, exclude the post type or taxonomy from the sitemap until you create content. Go to Admin > SEO > XML Sitemaps and check the items to exclude.
3
If you still receive a 404, check the rewrite rules for your server.

Using Apache

This article has more advice on troubleshooting the sitemaps on Apache servers: Yoast XML Sitemaps on Apache servers

Using NGINX

This article has more advice on troubleshooting the sitemaps on NGINX servers: Yoast XML Sitemaps on NGINX servers

Was this article helpful? ·