Generate sitemap.xml using WordPress SEO on Nginx

By default, XML sitemaps generated by the WordPress SEO plugin are named as sitemap_index.xml. But, by default, sitemaps are named as sitemap.xml. If your WordPress blog is running on Nginx and if you are using the Yoast WordPress SEO plugin, there is a way to access the sitemaps using either /sitemap_index.xml or /sitemap.xml.

WordPress SEO will provide two rewrite rules if you are running on Nginx. A third rule is required to load the XML stylesheet. More information on this is available here. Another fourth rule is required to fetch the XML sitemap from “/sitemap.xml“.

Once the above rule has been added to Nginx, the XML sitemaps can be accessed using either /sitemap_index.xml or /sitemap.xml.

ibrahim = { interested_in(unix, linux, android, open_source, reverse_engineering); coding(c, shell, php, python, java, javascript, nodejs, react); plays_on(xbox, ps4); linux_desktop_user(true); }