I want to use your XML Sitemaps with NGINX, is that possible?

Last update: 23 June, 2016

Yes, of course! (We in fact do that ourselves) Here are the rewrite rules you'll need:

# Rewrites for Yoast SEO XML Sitemap
rewrite ^/sitemap_index.xml$ /index.php?sitemap=1 last;
rewrite ^/([^/]+?)-sitemap([0-9]+)?.xml$ /index.php?sitemap=$1&sitemap_n=$2 last;

Was this article helpful? ·