Skip to content Skip to navigation
Back to the main support

My XML sitemap returns a 404 error

Since version 6.7 of SEOPress, flushing permalinks is now done automatically to avoid this issue when saving changes.

When you enable XML sitemaps, or change some options related to XML sitemaps, you have to flush your permalinks (ie: updating URL rewriting).

To do that, just click the Flush permalinks button in SEO > XML / HTML Sitemap.

Or, go to Settings > Permalinks. You don’t need the save the page to flush your permalinks. It’s done each time you visit this page.

Also, make sure to never cache XML sitemaps. Usually, caching plugin like W3Total Cache or WP Rocket automatically exclude this kind of files.

Finally, maintenance mode (via plugins for example) needs to be deactivated.

NGINX users must add to their NGINX configuration file these rewrite rules: