Sitemap xml feed from plugin is shown but 404 header added by WordPress if site has no posts
|Reported by:||Ov3rfly||Owned by:|
Installed a new site with only pages, no posts.
Also installed the WordPress Sitemap Generator Plugin with a modified template for the pages.
Testing example.com/sitemap.xml in browser showed the xml with all the pages, all seemed fine.
But then Google Webmaster Tools complained about a 404 not found for the /sitemap.xml url.
Some testing showed that WordPress adds a 404 header to all feeds, including the sitemap xml feed, if no posts exist in the website.
Using a work-aound for now, details here, but would like to know this behaviour is to be considered as a bug.