XML Sitemaps on NGINX (WordPress)

This article is only applicable to the cloud hosting packages (which are based on NGINX).

If you are using our cloud hosting servers and would like to use a SEO plugin that generates a XML sitemap for your website, please follow the steps described in this article, based on the plugin used.

  1. Login to the cloud panel.
  2. Click Applications in the main menu and click on the desired domain.
  3. Click Site Settings in the application menu and scroll to the bottom of the page.
  4. Click the Custom Server Directives tab.

In order for the sitemap to start working, the following code needs to be added into the Custom Server Directives field, based on the plugin you are using. We have prepared the required code for some of the most popular SEO plugins out there.

After inserting the code in to the mentioned field, save the changes and wait up to one minute. The sitemap should now be accessible.

Yoast SEO plugin

If you are using the Yoast SEO plugin, insert the following code into the Custom Server Directives field:

# 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;

Other plugins

In case you are using another plugin and your sitemap is not working, please contact our customer support.

Leave a Comment

Your email address will not be published. Required fields are marked *