Drupal 8 SEO: Differences between simple_sitemap and xmlsitemap

28 Feb 2016

First it should be noted, that at the time of writing this, the XML sitemap module is not working on Drupal 8, which makes Simple XML sitemap the obvious choice for Drupal 8 installations. However, there is effort to port the XML sitemap module to D8 stable, see this queue. This comparison may be interesting for XML sitemap users moving to Drupal 8 or for users intending to wait for the port. (Do not wait, help out!) Please also be advised that gbyte made Simple XML sitemap, which makes this comparison intrinsically biased.

There are major differences between Simple XML sitemap (simple_sitemap) and XML sitemap (xmlsitemap) and depending on your use case, you might want to choose one or the other.

What sets the modules apart are their complexity, performance and feature sets.

Code base

Having been built specifically for D8, simple_sitemap has arguably a much cleaner code base adhering to D8 standards including the use of OOP, an exportable configuration and the D8 plugin architecture. In contrast, the xmlsitemap module will have a hard time adjusting to D8 technologies and guidelines, as it carries around a whole lot of legacy code going back as far as Drupal 5.


What is meant here is the impact of the module on a Drupal 8 system, how quick the sitemap generation process is and how long it takes for a visitor to fetch the sitemap.

Sitemap generation performance

Both the modules feature the batch API which allows to generate huge amounts of links without hitting any PHP limits. The sitemap generation performance differs in that it is a one step process in simple_sitemap as opposed to the two step process of the xmlsitemap module.

While the simple_sitemap's one step process is less error prone and initially generates the sitemap quicker, xmlsitemap's two steps have the advantage of tracking which entities have changed since last generation through implementing an additional database table making sure the subsequent rebuilds are quicker.

Sitemap fetching performance

When it comes to fetching the sitemap, both modules cache them: xmlsitemap creates a physical file, while simple_sitemap caches the sitemap in the database.
Both modules have the ability to set the maximum amount of links included in the sitemap and they generate multiple sitemaps along with an index if this amount is exceeded.

Consequently there should be no noticeable difference between the two modules when it comes to fetching performance.

Overall system impact

Because of its leaner code base and the fact that the code does not get invoked through hooks all to often, simple_sitemap's footprint is much smaller.

Supported entities

Both of the modules support nodes, taxonomy terms, menu links, users and custom links out of the box. While xmlsitemap implements these functionalities as modules, simple_sitemap chooses the D8 plugin format.

XML Sitemap standards

Here the edge goes to simple_sitemap, as it features the newer hreflang XML standard developed by google. Adhering to Google's standards is important, as this is the search engine most of us would like to correctly understand and index our site.

Additional functionality

Having been around since 2007, the xmlsitemap module has had lots of time to incorporate various additional functionalities which are not present in simple_sitemap (yet). Automatically sending the stiemap to search engines, the ability to further customize XML output are some of these functionalities.

The new 2.x version of simple_sitemap has caught up some by implementing batch operations and drush support.

Pluggability and extensibility

The xmlsitemap module is extensible through the use of a custom module implementing a set of hooks. This may be a bit complicated and time consuming to get right.

In contrast, simple_sitemap uses the D8 plugin system and writing a plugin to support a custom entity type (one not included in core) is a breeze. Any module can implement its link generating plugin and it is the matter of one correctly annotated file with one SQL query object returned.

We will be following up with some documentation on how to write a sitemap plugin.

Which one is right for me?

At the moment simple_sitemap is your only option. As soon as xmlsitemap is fixed for Drupal 8, you will have to decide: simple_sitemap for a more performant and extensible codebase with the newer sitemap standard, or xmlsitemap for its bigger feature set and a smarter sitemap generation process.

Add new comment

The content of this field is kept private and will not be shown publicly.

Restricted HTML

  • Allowed HTML tags: <a href hreflang> <em> <strong> <cite> <blockquote cite> <code> <ul type> <ol start type> <li> <dl> <dt> <dd> <h4 id> <h5 id> <h6 id>
  • Lines and paragraphs break automatically.
  • Web page addresses and email addresses turn into links automatically.

Get a quote in 24h

Wether a huge commerce system, or a small business website, we will quote the project within 24 of you pressing the following button: Get quote