{"id":19000252,"date":"2026-08-22T15:13:40","date_gmt":"2026-08-22T15:13:40","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/wordpress-7-1-breaks-native-xml-sitemaps-on-nginx-reverse-proxy-apache\/"},"modified":"2026-08-22T15:34:21","modified_gmt":"2026-08-22T15:34:21","slug":"wordpress-7-1-breaks-native-xml-sitemaps-on-nginx-reverse-proxy-apache","status":"publish","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/wordpress-7-1-breaks-native-xml-sitemaps-on-nginx-reverse-proxy-apache\/","title":{"rendered":"WordPress 7.1 breaks native XML sitemaps -works correctly on 7.0.4"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">WordPress 7.1 breaks native XML sitemaps on Nginx reverse proxy + Apache<br \/><br \/>Environment<\/p>\n\n\n\n<ul>\n<li>WordPress 7.1: affected<\/li>\n\n\n\n<li>WordPress 7.0.4: works correctly<\/li>\n\n\n\n<li>Theme: Twenty Twenty-Five<\/li>\n\n\n\n<li>Editor: Gutenberg \/ WordPress block editor<\/li>\n\n\n\n<li>Plugins: <strong>none<\/strong><\/li>\n\n\n\n<li>Web server: Nginx as a reverse proxy in front of Apache<\/li>\n\n\n\n<li><code>.htaccess<\/code>: default WordPress rules<\/li>\n\n\n\n<li>Native WordPress XML sitemaps enabled<\/li>\n\n\n\n<li>No SEO plugin or sitemap plugin is installed<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Description<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">I have a WordPress site built entirely with the default Twenty Twenty-Five theme and Gutenberg. There are no plugins installed at all.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The site was running WordPress 7.0.4 and everything worked correctly, including the native WordPress XML sitemap.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">After upgrading the exact same site to WordPress 7.1, the native XML sitemap URLs started returning HTTP 404 errors.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The problem affects the sitemap index as well as the individual sitemap.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For example:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><code>\/wp-sitemap.xml<\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">and:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><code>\/wp-sitemap-posts-page-1.xml<\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">both returned HTTP 404 after upgrading to WordPress 7.1.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The site uses Nginx as a reverse proxy in front of Apache. The Apache <code>.htaccess<\/code> contains the standard WordPress rewrite rules and has not been customized.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Reproduction<\/strong>:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">With WordPress 7.1 installed, I tested the sitemap directly from PowerShell using <code>curl<\/code>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For example:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><code>curl.exe -v \"https:\/\/example.com\/wp-sitemap.xml\" -o wp-sitemap-test.xml<\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The server returned:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><code>HTTP\/1.1 404 Not Found<\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">with:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><code>Server: nginx<\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">I also tested:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><code>curl.exe -v \"https:\/\/example.com\/wp-sitemap-posts-page-1.xml\" -o pages-sitemap-test.xml<\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">which also returned:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><code>HTTP\/1.1 404 Not Found<\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">I additionally tested the sitemap query directly:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><code>curl.exe -v \"https:\/\/example.com\/?sitemap=posts&amp;sitemap-subtype=page&amp;paged=1\" -o query-sitemap-test.xml<\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This also returned:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><code>HTTP\/1.1 404 Not Found<\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The same behavior was reproducible repeatedly; it was not an intermittent request failure.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Control test<br \/>I then rolled WordPress back from 7.1 to WordPress 7.0.4 on the same site.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">No other changes were made.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Immediately after reverting to WordPress 7.0.4, the native sitemap started working again.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The following URLs worked normally again:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><code>\/wp-sitemap.xml<\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><code>\/wp-sitemap-posts-page-1.xml<\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The site and its native sitemap functionality were therefore working correctly on 7.0.4, and the problem appeared immediately after upgrading to 7.1.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">I also tested different default WordPress themes, including Twenty Twenty-Four and Twenty Twenty-Five. The issue was not resolved by changing themes.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">There are no plugins involved, so there is no third-party sitemap, SEO, caching, or security plugin that could be causing the problem.<br \/><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Additional information<br \/>The WordPress-generated sitemap contains the expected child sitemap, and before the rollback Google Search Console reported:<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">Couldn&#8217;t fetch<\/p>\n<\/blockquote>\n\n\n\n<p class=\"wp-block-paragraph\">for the sitemap.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">When submitting the sitemap index, Google was able to discover the three pages contained in the page sitemap, but ultimately reported that the sitemap could not be fetched.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">After rolling back to WordPress 7.0.4, the sitemap immediately became accessible again.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The standard <code>.htaccess<\/code> is:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># BEGIN WordPress\n# The directives (lines) between \"BEGIN WordPress\" and \"END WordPress\" are\n# dynamically generated, and should only be modified via WordPress filters.\n# Any changes to the directives between these markers will be overwritten.\n&lt;IfModule mod_rewrite.c&gt;\nRewriteEngine On\nRewriteRule .* - &#091;E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]\nRewriteBase \/\nRewriteRule ^index\\.php$ - &#091;L]\nRewriteCond %{REQUEST_FILENAME} !-f\nRewriteCond %{REQUEST_FILENAME} !-d\nRewriteRule . \/index.php &#091;L]\n&lt;\/IfModule&gt;\n\n# END WordPress\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">No custom sitemap code, SEO plugin, caching plugin, security plugin, or other plugin is installed.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Expected behavior<br \/>The native WordPress sitemap URLs should be accessible and return the generated XML sitemap, as they do on WordPress 7.0.4.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Actual behavior<br \/>On WordPress 7.1, the native sitemap URLs return HTTP 404.<br \/><br \/><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Regression<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The issue appears to be a regression introduced between WordPress 7.0.4 and WordPress 7.1.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The same site, same server environment, same theme, same <code>.htaccess<\/code>, and no plugins works correctly on 7.0.4 and fails on 7.1.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">I am reporting this because the problem affects the built-in WordPress sitemap functionality and can prevent search engines from fetching the native sitemap.<\/p>\n","protected":false},"template":"","class_list":["post-19000252","topic","type-topic","status-publish","hentry"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/19000252","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":1,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/19000252\/revisions"}],"predecessor-version":[{"id":19000263,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/19000252\/revisions\/19000263"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=19000252"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}