Mapping Your SEO Success: Why You Need an XML Sitemap and How to Configure It in Drupal
Authored by Nadiia Nykolaichuk.
For centuries, humans have relied on maps to navigate the world and reach their destinations. Today, search engines use a similar tool to navigate the vast landscape of the web — the XML sitemap. By creating a clear and structured map of your website’s pages, you help search engines find and index your content more efficiently, paving the way for SEO success. In this article, we’ll explore in more detail why you need a sitemap, how it works, and how to configure it using a popular Drupal module — Simple XML sitemap.
How does a sitemap work?
A sitemap works by providing a structured list of all the important pages on your website in a format that search engines can easily read and understand. Google, Bing, and similar tools use crawlers (automated bots) to scan and index website pages. A sitemap helps these crawlers quickly find all the pages they need to index. It also helps reveal new and updated pages for faster indexing.
As mentioned by Google’s documentation on sitemaps, XML (Extensible Markup Language) is the most versatile format for a sitemap. It allows for extensions that include additional data such as images, videos, news content, and localized versions of pages.
An XML sitemap is a file that lists the URLs of all of your website’s pages. Each URL is linked to additional information, such as how often the page is updated, how important it is compared to others, and when it was last modified.
Why you need an XML sitemap
As a rule of thumb, the more easily search engines can crawl and understand your content, the higher the chances it will appear in relevant search results. Here are some specifics of a sitemap’s work that contribute to the overall SEO boost:
- Improved indexing with no important pages missed. Without an XML sitemap, crawlers might miss some pages, especially if they aren’t linked to other parts of a website. A sitemap ensures that even those hidden or less obvious pages are included in the search engine’s index. This is especially important for large or complex websites where pages might not be easily discoverable through internal linking alone.
- Faster updates after content changes. If you frequently add or update content, the sitemap tells search engines when a page has been modified. This helps the search engine index the new or updated content faster, so it shows up in search results sooner.
- SEO best practice. While not a ranking factor by itself, having an XML sitemap is considered a best practice for SEO. While adhering to this practice, you ensure that your important pages are included in search engine indexes, which helps you avoid potential issues with site visibility.
- Additional metadata for rich snippets. Some sitemaps can include additional structured data about your pages, such as video content, images, or product info. It helps search engines display rich snippets, which can improve the visibility and click-through rate of your pages.
- Compatibility with modern features. XML sitemaps are widely used in modern SEO tools, like Google Search Console, to provide insights into your site’s crawling and indexing health. Additionally, some sitemaps now support new formats, like video or image sitemaps, to better handle rich media.
Configuring an XML sitemap on a Drupal website
The Simple XML sitemap module is one of the most efficient, comprehensive, and widely used solutions for creating and managing sitemaps in Drupal.
The key features of the Simple XML sitemap module
The Simple XML sitemap module could easily be called “Advanced XML sitemap.” It does have several out-of-the-box pre-configured features that make things simple. However, it also accommodates more tech-savvy SEO managers and website administrators by offering a wealth of granular options and settings.
The module’s features include (but are not limited to) the following:
Support for various entities. The module natively supports most Drupal entities, such as:
- content (articles, news, landing pages, and more)
- tags or categories (taxonomy terms) that are helpful for indexing content based on specific topics or keywords
- menu links
- users
- and more
For simplicity, we’ll use the term “content” when referring to various entities on your Drupal website to explore the module’s capabilities.
Flexible settings. The module gives you granular control over your sitemap’s settings. You can:
- specify which content types should be included in the sitemap
- specify sitemap update frequencies and priorities (per each content type or for specific content items)
- exclude certain content from the sitemap
- and much more
Submitting sitemaps to search engines. The module can automatically submit sitemaps to some search engines. It supports the IndexNow protocol for immediate updates on content changes.
Image and video sitemaps. If your site includes media like images or videos, you can extend the sitemap to include image sitemaps and video sitemaps. This helps search engines index media content and improve visibility in search results.
Multiple languages. The module is a gold mine for multilingual websites since it generates sitemaps that adhere to Google’s multilingual content standard. Hreflang attributes in a sitemap help search engines understand which versions of your site are intended for specific languages or regions.
Default sitemaps. Immediately after installing the module, you’ll find a pre-configured default sitemap, which will give you a good starting point. The module also comes packed with a sitemap index, which helps organize multiple sitemaps on your website.
Views integration. The Simple XML sitemap module integrates with Drupal Views — the most powerful tool for creating various content listings. It allows you to include Views-generated content in your sitemap.
Advanced options. Advanced users can enhance the module’s functionality by creating custom plugins or using hooks to generate additional URLs or sitemaps.
How to configure a sitemap in Drupal via the Simple XML sitemap module
Installation
The Simple XML sitemap module comes packed with 3 submodules. By selecting the respective checkboxes on the “Extend” tab, you can install the submodules you’re going to need on your Drupal website:
- Simple XML Sitemap. This is the main submodule that generates sitemaps.
- Simple XML Sitemap (Search engines). This submodule submits sitemaps to search engines.
- Simple XML Sitemap (Views). This one integrates with Drupal Views.
![simple xml sitemap module submodules](/sites/default/files/2025-02/simple-xml-sitemap-module-submodules.png)
The Simple XML Sitemap module’s submodules
Including content in an XML sitemap and configuring its main settings
As mentioned above, you can use the “Default’ sitemap provided by the module. However, you’ll need to add the content that needs to be indexed.
You can add an entire content type (such as “Article”) to your sitemap, ensuring all articles are included — unless you choose to exclude specific ones individually. There are multiple ways to do this, but one method stands out as the simplest starting point.
Go to Structure > Content types > Article > Edit. At the bottom of the settings page that opens, you’ll see the “Simple XML Sitemap” section. Out of the box, it has a note “Excluded from all sitemaps.” Click “Simple XML Sitemap” and you’ll see the list of all sitemaps on your website. Out of the box, there will only be the “Default” sitemap. Click to expand its settings and you’ll see two indexing options for articles:
- Do not index entities of type Article in sitemap “Default”
- Index entities of type Article in sitemap “Default”
Select the 2nd option to enable indexing. After that, more options will appear:
Priority. You can set the priority for different content types (like homepage vs. articles). This priority tells search engines how important different pages are relative to each other. Values typically range from 0.0 to 1.0, with 1.0 being the highest priority. The module automatically includes your homepage in the “Default sitemap” and assigns the highest priority (1.0) to it. Other pages, like articles, have the default frequency of 0.5.
Frequency. You can define how often content should be crawled (like “Always,” “Hourly,” “Daily,” etc.). This helps search engines understand how often they should check for updates on specific types of content. For example, blog posts might be updated more often than static pages, so they might be good with the “daily” change frequency.
Include images. Choose whether images that are present in the content should be included with the sitemap.
Notify IndexNow search engines of changes by default. By selecting this checkbox, you send a change notice to IndexNow-compatible search engines (Bing, Yandex, Yep, Seznam, etc.) right after creating, deleting, or updating articles. This setting can be overridden on the entity form.
Regenerate all sitemaps after hitting “Save.” This setting will regenerate all sitemaps that include the above-mentioned content changes. Otherwise, the sitemaps will be regenerated during a future run of Drupal’s automated task runner Cron, which happens at regular intervals.
Save the result.
![](/sites/default/files/2025-02/including-content-type-sitemap-configuring-main-settings.png)
Including a content type in a sitemap and configuring the main settings
Sitemap settings for individual content items
Adding or removing content from appearing in your sitemap can also be done at the level of specific content items. For example, you might have the “Basic page” content type added to your sitemap, but you do not want some pages to be indexed (like privacy policy, terms of service, or thank-you pages).
Just find the Simple XML Sitemap section in the content editing form and select to index or not index a specific content item in a specific sitemap (in this case, “Default”). You can also fine-tune the priority and frequency settings for them.
![sitemap settings specific drupal content items](/sites/default/files/2025-02/sitemap-settings-specific-drupal-content-items.png)
Sitemap settings for specific Drupal content items
Managing your XML sitemaps
To manage all the generated sitemaps, go to Configuration > Search and metadata > XML sitemap. You can see the list of all sitemaps on your website. Out of the box, there will be the “Default” and the “Sitemap index” sitemaps. You can also create new ones using the “+Add sitemap” button. Furthermore, this page allows you to regenerate your sitemaps manually via the “Rebuild queue and generate” button.
In the previous step, we included articles in the “Default” sitemap and clicked to regenerate it, so these changes will be reflected on this page. There is a progress bar showing that the sitemap has been regenerated.
Next to each sitemap on the list, there is an operations menu where you can choose to edit or delete it. Sitemaps can also be regenerated on demand here.
Sitemap Index. The “Sitemap Index” is also listed there but isn’t enabled out of the box. Enabling it is optional. It is essentially a “master sitemap” that links to multiple smaller sitemaps. It’s particularly useful for large websites where the number of URLs exceeds the limit for a single sitemap (usually 50,000 URLs or 50 MB uncompressed). It helps keep the sitemaps organized.
You can enable the sitemap index, move it to the end in the sitemap list, and set it as the default sitemap on the “Settings” tab.
![main page managing sitemaps simple xml sitemap module](/sites/default/files/2025-02/main-page-managing-sitemaps-simple-xml-sitemap-module.png)
The main page for managing all sitemaps on the Simple XML sitemap module’s dashboard
Checking out your sitemaps
You can simply click on a sitemap’s name from the admin dashboard and it will open in a new tab. It must be noted that in the sitemap screenshot below, the first part of the URLs might look a bit long and not easily human-readable. That’s because this demo sitemap is on a temporary Drupal SimplyTest.me installation. Your sitemaps, using your actual website’s name, will look much more concise and clean.
They will be publicly accessible at the following addresses:
- [your-website-name]/sitemap-name/sitemap.xml for specific sitemaps
- [your-website-name]/sitemap.xml for the “Default” sitemap. However, if you enable the Sitemap Index, this link will list the links to all sitemaps instead.
As you can see in the example, the “Default” sitemap includes the URLs of the articles that have been published for the moment. Furthermore, as mentioned earlier, the homepage is included automatically. This homepage is a crucial entry point for search engine crawlers and must be indexed for proper SEO. The module automatically assigns the highest priority (1.0) to it. Other pages, like articles, may receive lower priorities unless configured otherwise, and their default priority is 0.5.
![how drupal sitemap looks](/sites/default/files/2025-02/how-drupal-sitemap-looks.png)
How a Drupal sitemap looks
Sitemaps for multilingual websites
If you have a multilingual Drupal website with at least one more language configured, make sure the content in this language is included in the sitemap.
First, make sure the “Enable translations” checkbox is checked on the “Edit” page of a content type. For example, you can enable it for articles at Structure > Content types > Article > Edit > Language settings.
Add content in the primary and secondary language by using the “Translate” tab on the content editing form. When your sitemap regenerates, it will include URLs in both languages. In this example, we see a sitemap containing content in English and French.
![](/sites/default/files/2025-02/how-drupal-sitemap-multilningual-content-looks.png)
How a Drupal sitemap with multilingual content looks
Submitting the sitemap to search engines
Your sitemap can be automatically submitted to IndexNow-compatible search engines (such as Bing and Yandex).
You can see the search engines listed by going to the “Search engines” tab. New engines can be added programmatically.
![](/sites/default/files/2025-02/list-search-engines-simple-xml-sitemap-module-dashboard.png)
A list of search engines on the Simple XML sitemap module’s dashboard
Switching to the “Settings” tab reveals the IndexNow configuration options, including your preferred search engine, automatic indexing after content edits, and more. Since IndexNow is a third-party service, you'll need to obtain a key to enable its functionality.
![](/sites/default/files/2025-02/settings-for-search-engines-simple-xml-sitemap-module-dashboard.png)
The settings for search engines on the Simple XML sitemap module’s dashboard
While the module can automatically notify IndexNow-compatible search engines, for others (like Google), you would typically need to submit the sitemap manually. Google’s Search Console (GSC) allows you to submit a sitemap URL (like /sitemap.xml) to tell Google to crawl and index your site. To do this:
- If you haven’t already, verify ownership of your site in GSC.
- Navigate to the Sitemaps section in GSC. Enter the URL of your sitemap like https://website-name.com/sitemap.xml). Click “Submit.”
- Add the following line to your robots.txt file:
Sitemap: https://website-name.com/sitemap.xml - Google bots will read this and crawl the sitemap.
Settings for sitemaps
On the “Settings” tab, you can configure more details about your sitemaps. For example, there is a setting for automatic regeneration of sitemaps at regular intervals using Drupal’s Cron. Uncheck this setting if you’d like to regenerate them manually or if you prefer doing it via the Drush command line tool. Also on this page, you can choose the default sitemap, set the maximum links in a sitemap, and more.
![Settings tab drupal sitemaps](/sites/default/files/2025-02/settings-tab-drupal-sitemaps.png)
The “Settings” tab for Drupal sitemaps
The inclusion of entities
On the “Inclusion” tab, you’ll see which content types or other entity types are included or excluded from which sitemaps. You can fine-tune this by selecting or deselecting the appropriate checkboxes. By clicking “Configure,” you go to the sitemap settings for entity types.
Earlier in the guide, we demonstrated how to include a content type in a sitemap directly from the content type’s page. However, the “Inclusion” tab we’re discussing now provides more flexibility. It encompasses a wider range of entities and offers more granular settings. This tab includes subtabs for entities, custom links, and views, allowing for comprehensive control over sitemap generation.
![](/sites/default/files/2025-02/managing-inclusion-exclusion-entities-drupal-sitemaps.png)
Managing the inclusion/exclusion of entities in Drupal sitemaps
Creating other sitemap types
You may need other sitemap types depending on the specifics of your site and SEO strategy. This allows you to fine-tune your SEO, provide better crawling control, and improve performance. There is a “Types” tab where you can add other sitemap types in addition to the ones provided out of the box.
![Adding Drupal sitemap types](/sites/default/files/2025-02/adding-drupal-sitemap-types.png)
Adding Drupal sitemap types
Final thoughts
Offer search engines a well-crafted map of your website to ensure their journey through your pages is as efficient as possible. This effort will yield quick results, with more of your content appearing in organic search results, increasing the chances for users to discover what you offer. Drupal supports this with excellent modules for setting up your XML sitemap, and our development team is here to assist you whenever you need help.