Sitemap 404 Not Found
If you’re using Nginx as your web server and install the Google XML Sitemap plugin in your WordPress web site, then when you submit your xml sitemap to Google Search Console, you may get a WordPress sitemap 404 not found error.

The Solution
The answer is easy, simply copy the next strains to your nginx virtual host file. On CentOS/Redhat Server, the virtual host file usually is /etc/nginx/conf.d/yoursite.com.conf. On Debian/Ubuntu Server, it’s situated at /etc/nginx/sites-available/yoursite.com
rewrite ^/sitemap(-+([a-zA-Z0-9_-]+))?.xml$ "/index.php?xml_sitemap=params=$2" last;
rewrite ^/sitemap(-+([a-zA-Z0-9_-]+))?.xml.gz$ "/index.php?xml_sitemap=params=$2;zip=true" last;
rewrite ^/sitemap(-+([a-zA-Z0-9_-]+))?.html$ "/index.php?xml_sitemap=params=$2;html=true" last;
rewrite ^/sitemap(-+([a-zA-Z0-9_-]+))?.html.gz$ "/index.php?xml_sitemap=params=$2;html=true;zip=true" last;
Save the virtual host file and reload Nginx.
sudo systemctl reload nginx
or
sudo /etc/init.d/nginx reload
If you first installed Google XML Sitemap plugin, it will give a warning if you’re using Nginx. The above rewrite rules may also be found if you go to Settings > XML-Sitemap.
Following this will ensure your Google Search Console shows less failures, errors and all pages index faster.
