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 All in One SEO Pack XML Sitemap on nginx, then please 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 in the first place):

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;

If this doesn’t work for you, then please contact us.

[i]
[i]
Skip to toolbar