Back to Community

Troubleshooting SEOPress XML Sitemap Redirects and 404 Errors

23 threads Sep 10, 2025 PluginSeopress – on-site seo

Content

XML sitemaps are a critical component of any website's SEO strategy, helping search engines discover and index your content. However, users of the 'SEOPress – On-site SEO' plugin sometimes encounter issues where their sitemap URLs redirect unexpectedly, lead to a 404 error, or redirect to the homepage. This guide will explain why these issues occur and provide the most common, effective solutions based on community reports and resolutions.

Common Symptoms

  • Visiting /sitemap.xml or other common sitemap URLs does not show the XML content.
  • The sitemap URL returns a 404 "Page Not Found" error.
  • The sitemap URL redirects to the website's homepage.
  • Search engines like Google report that the sitemap "doesn't contain any URLs" or cannot be read.
  • Changes to sitemap settings do not seem to take effect.

Why This Happens

These problems are almost always related to how WordPress handles its internal rewrite rules, which control the pretty permalinks for all content, including XML sitemaps generated by plugins like SEOPress.

  1. Outdated Rewrite Rules: The most common cause is that WordPress's internal list of URL routes is outdated. When you activate, deactivate, or change settings in a plugin that affects URLs (like a sitemap), these rules need to be refreshed.
  2. Cached Configurations: Server-level or object caching can sometimes serve an old version of the website's configuration, preventing new sitemap URLs from working correctly.
  3. Plugin Conflicts: Code from other plugins or your theme can interfere with the normal generation or redirection of sitemap URLs.
  4. Multisite or Complex Server Setups: Websites running on multisite installations or specific server software like NGINX may require additional configuration for rewrite rules to work properly.

How to Fix Sitemap Redirect and 404 Issues

The following troubleshooting steps are listed from the most common and easiest solution to more advanced fixes.

Solution 1: Flush Your Permalinks (The Most Common Fix)

This is the first and most important step to try. Flushing permalinks forces WordPress to rebuild its internal rewrite rules, which often resolves sitemap issues immediately.

  1. Navigate to your WordPress admin dashboard.
  2. Go to Settings > Permalinks.
  3. Do not change any settings. Simply click the "Save Changes" button at the bottom of the page.
  4. Clear any site or server cache you may have (e.g., from a caching plugin, Cloudflare, or your host's control panel).
  5. Retest your sitemap URL (e.g., yoursite.com/sitemaps.xml).

Solution 2: Toggle the SEOPress Sitemap Feature

If flushing permalinks alone doesn't work, try reactivating the sitemap feature itself to ensure it registers its rules correctly.

  1. Navigate to SEOPress > XML / HTML Sitemap.
  2. Toggle the main "XML Sitemap" switch to OFF and save changes.
  3. Flush your permalinks again (Settings > Permalinks > Save Changes).
  4. Return to the SEOPress sitemap settings and toggle the main switch back to ON. Save changes.
  5. Flush your permalinks one final time.
  6. Clear your site and server cache again and retest.

Solution 3: Check for Conflicts

A theme or plugin conflict could be intercepting requests to sitemap URLs. To test for this:

  1. Temporarily switch your theme to a default WordPress theme like Twenty Twenty-Four.
  2. Deactivate all other plugins except SEOPress.
  3. Test if your sitemap is now loading correctly.
  4. If it works, reactivate your plugins one by one, testing the sitemap after each, to identify the culprit.
  5. Finally, reactivate your original theme to see if it causes the issue.

Solution 4: Advanced Server Configuration (For NGINX Users)

Users on NGINX servers, particularly in multisite environments, may find that the standard WordPress permalink flush is not sufficient. The SEOPress team has provided sample NGINX rewrite rules for single sites. If you are technically comfortable, you may need to adapt these rules for a multisite setup. Consulting your hosting provider's support or a system administrator is recommended for this step.

Important Notes on Sitemap URLs

  • The official sitemap index file generated by SEOPress is sitemaps.xml (plural). The plugin includes automatic redirections from other common URLs like the singular sitemap.xml to the correct plural version.
  • According to Google's own documentation, the specific URL of a sitemap does not impact SEO, as long as it is a valid, accessible URL that you submit to Search Console.

By following these steps, most users can successfully resolve issues with their SEOPress XML sitemap not loading correctly. If problems persist after trying all these solutions, it can be helpful to search the wider WordPress community for advice specific to your unique server configuration or plugin combination.

Related Support Threads Support