---
title: "Beginner Guide: Simple XML Sitemap Module"
date: "2023-06-23T19:57:40+00:00"
summary:
image:
type: "article"
url: "/acquia-cloud-platform/help/90106-beginner-guide-simple-xml-sitemap-module"
id: "616eb58c-f2d2-4aa5-87fd-8c31e589927a"
---

Table of contents will be added

Goal
----

The goal of this tutorial is for you to install the Simple XML Sitemap module and have it generate a sitemap for your Drupal site.

Overview
--------

A Drupal sitemap XML file acts as a roadmap for search engines and users, enabling them to discover and understand the structure of your website. By providing a clear and organized representation of your site's content, you can improve its visibility in search engine result pages (SERPs). The Drupal Simple Sitemap XML module simplifies this process by generating an XML sitemap automatically for your Drupal website.

1.  Add/Enable the Drupal Module to your Codebase
    ---------------------------------------------
    
    ### Add the Module
    
    Depending on how your Drupal site is setup, there are different ways to add the module to your codebase. The most popular was is through Composer and that can be accomplished using the following command:
    
         composer require drupal/simple_sitemap
    
    If you would like additional information about installing modules on your Drupal site, you can reference the [Acquia Docs](https://docs.acquia.com/resource/module-install-d9/) page on this topic.
    
    ### Enable the Module
    
    After the module has been added to your Drupal codebase, you need to enable the module to make it available to configure and use.
    
    Navigate to Extend in the Admin Toolbar, when you get to the Drupal Module listing page you can filter the list by typing "simple" which will shorten the list of modules so you can find the one you are looking for. The Simple Sitemap XML module comes with 3 components but we are only covering the "Simple Sitemap XML" module in this tutorial.
    
    ![Search interface showing "sitemap" results with options for XML sitemap modules for SEO, search engines, and views. Install button visible.](https://acquia.widen.net/content/83a2317a-5672-4e3f-9c40-d0abf8eeebaf/web/url_c3984dbfcca80cddca87c219637c4bf0.png)
    
    Check off "Simple XML Sitemap" and click the "Install" button.
    
2.  Drupal Global Settings Configuration for the Sitemap
    ----------------------------------------------------
    
    After installing the Simple Sitemap XML module, the default sitemap is created and it provides you with some global configuration settings for the created sitemap. You can navigate to Configuration > Search and Metadata > Simple Sitemap XML in the Admin Toolbar to get the configuration page.
    
    Select the "Settings" tab on the start configuration page that you went to.
    
    On the settings tab you will have some defaults selection made for you. the critical configuration changes to make are:
    
    *   Regenerate the sitemap on Cron runs: You will likely be running cron frequently and this will ensure that the sitemap is updated with new content.
        
        ![Settings page for sitemap generation, featuring toggle switches for cron run regeneration and styling, with a dropdown for interval selection.](https://acquia.widen.net/content/b8af0f03-03ac-4680-bca5-63fe6830290a/web/url_b569d447564791eacb67085a19b6796b.png)
        
    *   Default Base URL: This is important, if you've split your config for each env (Dev/Stage/Prod) make sure you set the Base URL accordingly to make sure the right URL is setup in the sitemap.
        
        ![Settings page for sitemap configuration, showing options for default URL, duplicate links, maximum links, generation duration, and entities per queue item.](https://acquia.widen.net/content/5a85c23f-ab58-4453-9fc4-ecbdfd320bac/web/url_8359296c5c6a1a5fd2deba10c4b9650b.png)
        
    
    Other configuration items provide guidance on the recommended defaults and you can set them up for your specific use case.
    
3.  Drupal Sitemap Configuration - Content Inclusion
    ------------------------------------------------
    
    After installing the module it will generate a default sitemap file for you, that will be available at /sitemap.xml on your domain.
    
    However, we need to do some additional work to get content listed in our sitemap.
    
    Go to Configuration > Simple Sitemap XML in the Admin Toolbar.
    
    ![XML Sitemap interface showing regeneration status, progress bar at 100%, and details of default hreflang sitemap with 3467 links.](https://acquia.widen.net/content/414bba44-b8d9-409f-b826-53d430cf41d6/web/url_08f9298892c60c29b4c3a4a8a2adbf10.png)
    
    To "Enable" content to be include in the sitemap, click on "Inclusion" and enabled "Content" to be added to the sitemap, we will have to configure each content type next.
    
    ![Settings interface for enabling content support, listing content bundles like Article, Award, Case Study, and more with default sitemap variants.](https://acquia.widen.net/content/1101d4f9-7021-43a0-8d5b-858a269ee7b3/web/url_c759ffa00cedfb1ff7201cdaf44e3473.png)
    
    Also within the "Inclusion" tab is a sub-tab to add Custom Links to the sitemap, this is helpful if you have non-content pages on your site that you would like included in your sitemap.
    
    ![Interface for configuring XML sitemap in Drupal, showing fields for custom links, sitemap variants, and image inclusion options with a "Save configuration" button.](https://acquia.widen.net/content/4a18841c-bcd9-41f8-8cf6-1dfe68f2673b/web/url_52a64d116f5b7c257ef705c4821b9735.png)
    
4.  Add Content to the Sitemap
    --------------------------
    
    Once you've enabled the module, the the default configuration and activate the module to allow content to be added, you now have to configure each content type to be include in the default sitemap.
    
    In this example, let's add the "Article" content type to the sitemap.
    
    Navigate to Structure > Content Types > Article and scroll to the bottom of the Edit Article content type page, you will then see a section called "Simple XML Sitemap", click that Title to open that section.
    
    ![Form interface for creating an article, with options for settings, sitemap variants, priority, change frequency, and image inclusion.](https://acquia.widen.net/content/7219b8c2-8d59-4127-a35e-691ae53a1572/web/url_5121d2344869efb428f38102466e1f9c.png)
    
    Be sure to enable the following options:
    
    *   "Index entities of type Article in variant Default"
    *   If this content type is of higher priority then other content types you can set the priority.
    *   If you want to regenerate the sitemap after saving the Content Type you can enable that as well.
    
    On next cron run, Article content that is published will be included in the sitemap located at /sitemap.xml on your site.
    
    ![Sitemap table showing URLs, last modification dates, change frequency, and priority for a website with 754 URLs.](https://acquia.widen.net/content/4fb24f35-c76f-4ef8-a0ab-17b02b966df7/web/url_293718203157ac743f0d12accba9c6d0.png)
    
    We will be providing additional Tutorials in the future on configure Views for Sitemaps and the important of sitemaps for your website.
    

Frequently Asked Questions
--------------------------

[What is the purpose of a sitemap?](#230548828-608049916)

A sitemap XML file helps search engines understand the structure and content of your website, making it easier for them to crawl and index your pages. It improves the chances of your website being discovered and ranked higher in search engine results.

[Are sitemaps still relevant?](#230548828-2037501630)

Yes, however, the way sitemaps are used has evolved, and it’s now recommended to utilize XML sitemaps, which are better structured for crawlers such as Google. Also, modern SEO is not reliant solely on sitemaps; it encompasses a broad range of factors such as page content quality, mobile-friendliness, user experience, and various other on-site and off-site factors. While sitemaps are one piece of the SEO puzzle, they shouldn’t be the only focus of an SEO strategy.

[Are there any other benefits of using the Simple Sitemap XML module?](#230548828-4124750558)

Yes, besides generating an XML sitemap, the Simple Sitemap XML module also provides additional features such as customizable URLs, support for multilingual sites, and the ability to exclude specific pages from the sitemap.

[Are there other XML Sitemap modules for Drupal?](#230548828-4203286479)

Yes! Besides the Simple Sitemap XML module there is also the [XML Sitemap module](https://www.drupal.org/project/xmlsitemap) that also provides the ability to generate a sitemap.xml file based upon the content within your Drupal site. Both modules are highly supported and will generate XML Sitemaps.

Thank You Drupal Contributors
-----------------------------

Special Thanks to the 2 maintainers of the Simple XML Sitemap Module:

[@gbyte](https://www.drupal.org/u/gbyte)  
[@WalkingDexter](https://www.drupal.org/u/walkingdexter)

Without your continued support we wouldn't have this simple and easy to use module.