404 on XML Sitemap in nginx

Need help with this?
Purchase All in One SEO Pack Pro to get dedicated support from us.

Buy Now

If you’re getting a 404 for your XML Sitemap on nginx in All in One SEO Pack, use the following rewrite rules in your config file (if you don’t know what to do with these, you shouldn’t be using nginx):

rewrite ^/sitemap.xml$ /index.php?aiosp_sitemap_path=root last;
rewrite ^/sitemap_(.+)_(\d+).xml$ /index.php?aiosp_sitemap_path=$1&aiosp_sitemap_page=$2 last;
rewrite ^/sitemap_(.+).xml$ /index.php?aiosp_sitemap_path=$1 last;

[i]
[i]
Skip to toolbar