Why can a SEOPress sitemap fail on a server with incorrect rewrite rules?

The Citead team, updated

In short. A SEOPress sitemap 404 calls for a permalink flush and a check that the server routes sitemap paths to the SEOPress endpoint.

Definition: A WordPress permalink is the URL structure used for posts, pages, categories, and other archive pages. A SEOPress sitemap can return an error when WordPress URL rewriting has not been refreshed or when the web server does not route sitemap requests to the SEOPress endpoint, as the WordPress permalink documentation and SEOPress troubleshooting documentation describe.

Key facts

  • SEOPress's Sitemap health check tests reachability, including HTTP 200, 404, 5xx, 401, and 403 responses, and checks that permalinks use a pretty structure. SEOPress documents the checks.
  • For a sitemap 404, SEOPress documents a Flush permalinks control in SEO > XML / HTML Sitemap and a flush triggered by visiting Settings > Permalinks. The 404 guide says saving the page is unnecessary.
  • WordPress documents Plain permalinks as working on all server environments, while Pretty and Almost Pretty permalinks depend on the necessary web server configurations. WordPress explains the permalink types.

What does the SEOPress health check test?

As of 9 July 2026, SEOPress places the built-in check at SEO > XML / HTML Sitemap > General > Test my sitemap. It reports whether the sitemap looks healthy, works with points needing attention, or has identified issues. The same SEOPress documentation says that the check examines whether the feature is enabled, whether the response is reachable, whether the response is XML, whether the XML is valid, whether the root element is a sitemap, and whether sub-sitemaps respond.

The check also separates routing from content checks. It checks for an XML response and flags HTML caused by cache or CDN interference. It checks the XSL stylesheet, robots.txt access, conflicting SEO or caching plugins, and whether the sitemap stays under the documented 50,000-URL limit. A 404 therefore belongs first to the permalink or routing path, while an HTML response points to response handling such as caching.

Flushing permalinks refreshes WordPress URL rewriting after XML sitemap activation or a related sitemap option change. SEOPress says the plugin performs this automatically when changes are saved. Its 404 guide also documents two manual paths:

SEO > XML / HTML Sitemap > Flush permalinks
Settings > Permalinks

The guide says that visiting Settings > Permalinks performs the flush without saving the page. WordPress describes the setting screen as the place where a site chooses a permalink structure or enters a custom structure. It also says that the hosting provider should configure the web server for Pretty and Almost Pretty permalinks. The WordPress permalink documentation therefore makes the server configuration a separate check from the WordPress setting itself.

What must an NGINX server route?

SEOPress's sitemap troubleshooting page tells NGINX users to add rewrite rules to the NGINX configuration file and contact the web host. Its linked 404 guide repeats that NGINX users must add the rules. The linked rule file contains a location block for sitemap-related XML paths and sends requests to /index.php with SEOPress query parameters. Its entries cover the sitemap index, news, video, author, XSL, video XSL, and content-type sitemap paths.

location ~ (([^/]*)sitemap(.*)|news|author|video(.*))\.x(m|s)l$ {
	## SEOPress
	rewrite ^.*/sitemaps\.xml$ /index.php?seopress_sitemap=1 last;
	rewrite ^.*/news.xml$ /index.php?seopress_news=1 last;
	rewrite ^.*/video([0-9]+)?.xml$ /index.php?seopress_video=1&seopress_paged=$1 last;
	rewrite ^.*/author.xml$ /index.php?seopress_author=1 last;
	rewrite ^.*/sitemaps_xsl\.xsl$ /index.php?seopress_sitemap_xsl=1 last;
	rewrite ^.*/sitemaps_video_xsl\.xsl$ /index.php?seopress_sitemap_video_xsl=1 last;
	rewrite ^.*/([^/]+?)-sitemap([0-9]+)?.xml$ /index.php?seopress_cpt=$1&seopress_paged=$2 last;
}

These rules are the configuration artifact linked by SEOPress's 404 troubleshooting guide; the rule file contains the same paths and parameters.

FAQ

What should you do after a SEOPress sitemap returns 404?

Use Flush permalinks in SEO > XML / HTML Sitemap, or visit Settings > Permalinks. If the site uses NGINX, check the NGINX rewrite rules with the hosting provider.

Plain permalinks work on all server environments according to WordPress. Pretty and Almost Pretty permalinks require the hosting provider's necessary web server configuration.

What should you check when the sitemap returns HTML?

Check caching plugins and the CDN. SEOPress's health check expects XML and identifies cache or CDN interference as a cause of an HTML response.

Sources

  1. SEOPress, "My XML sitemap doesn’t work or return errors", 9 July 2026
  2. SEOPress, "My XML sitemap returns a 404 error", 11 July 2025
  3. WordPress.org, "Customize permalinks", 28 June 2025
  4. SEOPress via GitHub Gist, "nginx-rewrite-rules.txt", 10 April 2019

Check how a page reads to answer engines. Open the GEO score analyzer

Test a page and see what to fix first

The analysis usually takes less than 10 seconds and needs no account.

400,000+ pages scored in the public benchmark