# Drupal XML sitemap

> Install Simple XML sitemap on Drupal 10.3 or 11, include the right entity bundles, generate the file, and fix host or multilingual issues.

Canonical: https://scaplet.com/seo/drupal/xml-sitemap

Guide Drupal · XML sitemap

Install Simple XML sitemap on Drupal 10.3 or 11, include the right entity bundles, generate the file, and fix host or multilingual issues.

5 min

read

4

sources

Oct 24, 2026

updated

Scaplet Editorial Team

author

In one line

For Drupal 10.3 or 11, install Simple XML sitemap 4.2 with `composer require 'drupal/simple_sitemap:^4.2'`. Configure it at `/admin/config/search/simplesitemap`, enable only the public entity types and bundles you want discovered, generate the sitemap, then inspect `/sitemap.xml`. Confirm its base URL is the canonical production host and submit it in Search Console; sitemap inclusion does not guarantee indexing.

30-second check

## Where does your site stand?

Four quick questions, then a straight answer.

1/4Have you checked your own site for this?

Summarize this page with [ChatGPT](https://chatgpt.com/?hints=search&q=Summarize%20https%3A%2F%2Fscaplet.com%2Fseo%2Fdrupal%2Fxml-sitemap%20(%22Drupal%20XML%20sitemap%22)%20in%205%20bullet%20points%2C%20then%20tell%20me%20the%20one%20thing%20I%20should%20do%20next.) [Claude](https://claude.ai/new?q=Summarize%20https%3A%2F%2Fscaplet.com%2Fseo%2Fdrupal%2Fxml-sitemap%20(%22Drupal%20XML%20sitemap%22)%20in%205%20bullet%20points%2C%20then%20tell%20me%20the%20one%20thing%20I%20should%20do%20next.) [Perplexity](https://www.perplexity.ai/search?q=Summarize%20https%3A%2F%2Fscaplet.com%2Fseo%2Fdrupal%2Fxml-sitemap%20(%22Drupal%20XML%20sitemap%22)%20in%205%20bullet%20points%2C%20then%20tell%20me%20the%20one%20thing%20I%20should%20do%20next.) [![Google](/logos/ai/google-color.svg)AI Mode](https://www.google.com/search?udm=50&q=Summarize%20https%3A%2F%2Fscaplet.com%2Fseo%2Fdrupal%2Fxml-sitemap%20(%22Drupal%20XML%20sitemap%22)%20in%205%20bullet%20points%2C%20then%20tell%20me%20the%20one%20thing%20I%20should%20do%20next.)

On this page

## 4 parts, 5 minutes.

1. [Install a release compatible with Drupal core 01](#install-a-release-compatible-with-drupal-core)
2. [Choose which Drupal content belongs in the sitemap 02](#choose-which-drupal-content-belongs-in-the-sitemap)
3. [Set the right public base URL and language behavior 03](#set-the-right-public-base-url-and-language-behavior)
4. [Validate and submit the sitemap 04](#validate-and-submit-the-sitemap)

_01_How it works

## Install a release compatible with Drupal core

The current Simple [XML sitemap](/glossary/xml-sitemap) branch is 4.2 (4.2.3, released November 26, 2025). Its info file and release feed declare `core_version_requirement: ^10.3 || ^11`, so it won't install on Drupal 10.0 to 10.2. Releases 4.2.1 and 4.2.2 list `^10.2 || ^11`, and 4.1.9 lists `^9.3 || ^10`. Check the release page before installing on an older core.

Install for Drupal 10.3 or 11

```
composer require 'drupal/simple_sitemap:^4.2' drush en simple_sitemap -y drush simple-sitemap:generate
```

**Check update behavior before upgrading**Read the project's release notes and back up configuration and content before a production module upgrade. This page covers the 4.2 branch only.

1. 01

### Add the module with Composer

From the Drupal project root, run `composer require 'drupal/simple_sitemap:^4.2'`. Keep the code and lockfile together and deploy through your site's normal release process.
2. 02

### Enable the module

Enable Simple XML sitemap through Extend or Drush. If upgrading the module, run pending database updates with the supported Drupal update process before generating new files.
3. 03

### Open sitemap configuration

Manage sitemaps at `/admin/config/search/simplesitemap` and module-wide settings at `/admin/config/search/simplesitemap/settings`. Module permissions are at `/admin/people/permissions/module/simple_sitemap`; restrict them to the appropriate role.
4. 04

### Generate and inspect the default sitemap

The module's default sitemap is available at `/sitemap.xml`. Generate it with the manual generation option on the sitemaps screen, or with `drush simple-sitemap:generate` (alias `ssg`), then open the public file and inspect its source. With cron generation on, it also regenerates on the interval set in Sitemap generation interval.

_02_How it works

## Choose which Drupal content belongs in the sitemap

The README says initially only the home page is indexed in the default sitemap. To include content, go to `/admin/config/search/simplesitemap/entities`, enable the [entity](/glossary/entity) types you want, and use Configure to set indexation per sitemap. Installation alone does not cover nodes, taxonomy terms, products, or custom content.

1. 1

### Enable relevant entity types

In the entity settings, choose content entities such as nodes, taxonomy terms, and commerce products that have public, useful pages.
2. 2

### Configure bundles deliberately

For each selected entity type, choose which bundles and languages are [indexable](/glossary/indexability). Exclude drafts, private entities, empty archives, duplicate views, and pages marked [noindex](/glossary/noindex).
3. 3

### Review entity-level exceptions

Where a page should not be listed, change its setting on the bundle's configuration page (for example `/admin/structure/types/manage/[content type]`) or override it on the entity's edit form (for example `/node/1/edit`). Only links accessible to anonymous users are included. Confirm translated content and publication state for every locale.
4. 4

### Add custom links only when needed

Use custom links for public routes that are not represented by enabled entities. Avoid manually listing URLs that a generator already includes.

Decide page family by page family
| Page family | Include when | Exclude when |
| Articles and landing pages | Published page gives a complete answer or serves a clear business purpose. | Draft, private, duplicate, or intentionally noindex. |
| Taxonomy and category terms | The archive has distinct inventory or editorial context and can help visitors choose. | Empty term, thin near-duplicate archive, or internal classification only. |
| Commerce products | Product is public and has useful, current details. | Private, discontinued without replacement, or duplicate variant URL. |
| Views or custom routes | The route is a canonical search [landing page](/glossary/landing-page) with stable content. | [Search results](/glossary/serp), filter combinations, or parameter variations with no unique value. |

_03_Checklist

## Set the right public base URL and language behavior

A sitemap generated from an unexpected host can publish staging URLs. The module's Default base URL setting (Advanced settings on `/admin/config/search/simplesitemap/settings`) exists because, in its words, on some hosting providers it is impossible to pass parameters to cron to tell Drupal which URL to bootstrap with. Fill it in with the canonical production origin when generation runs from cron or the command line and the links come out wrong; the form rejects an invalid URL and strips a [trailing slash](/glossary/trailing-slash).

1. 01 Check a generated `<loc>` for [HTTPS](/glossary/https), the canonical hostname, and the expected language prefix.
2. 02 For multilingual sites, decide whether each language variant should appear and verify the generated hreflang relationships against live canonical pages.
3. 03 The module can hold several sitemaps. The sitemap index is disabled by default; to list all sitemaps at `/sitemap.xml`, enable it, move it to the end of the sitemap list, and set it as the default sitemap on the settings page.
4. 04 Maximum links in a sitemap defaults to 2000 in the module's install config. When more links are generated, the module creates a sitemap index and splits them into sub-sitemaps. Google allows 50MB (uncompressed) or 50,000 URLs per sitemap.
5. 05 Skip non-existent translations is on by default: entity links are generated only for languages the entity has been translated to. The settings page also has Remove hreflang markup in HTML; its help text says Google recommends hreflang in either the HTML or the sitemap, not both.
6. 06 Regenerate after content or configuration changes and confirm that the new file replaces stale URLs without making the public endpoint unavailable during generation.

For very large content sets, generation can take time. Each sitemap is published as soon as all of its links are generated, and the previous version stays available meanwhile. The README documents a performance script (`drush scr --uri http://example.com modules/simple_sitemap/tests/scripts/performance_test.php`) and the settings Entities per queue item and Sitemap generation max duration.

_04_How it works

## Validate and submit the sitemap

1. 1

### Open the public XML

Request `/sitemap.xml` without authentication. Check the response status, XML syntax, canonical host, and whether the expected child sitemaps or page URLs are present.
2. 2

### Sample listed URLs

Choose examples from each included bundle and language. Confirm they return successful pages, use their preferred canonical, and are not blocked or marked noindex.
3. 3

### Submit under the matching Search Console property

Submit the sitemap URL in Search Console's Sitemaps report for the canonical host, as Google's sitemap guide describes. Google calls submission a hint: it doesn't guarantee that Google will download the sitemap or use it for crawling. Then inspect important URLs individually.
4. 4

### Fix the source setting

If a URL is missing, review bundle and entity inclusion. If a URL is listed but not indexed, inspect its page-level canonical, crawl access, and content usefulness instead of repeatedly resubmitting the file.

For broader guidance, read [Google Search Console sitemap submission](/seo/google-search-console/sitemap-submission) and the [XML sitemap overview](/glossary/xml-sitemap).

Sources · 4

## Every fact, linked and dated.

Official docs first. The date is when we last opened each page.

- drupal.org
- drupalcode.org
- google.com

1. 01 [Drupal.org release history feed (Simple XML sitemap)](https://updates.drupal.org/release-history/simple_sitemap/current) updates.drupal.org · checked 2026-10-24
2. 02 [Simple XML sitemap README | Drupal.org](https://git.drupalcode.org/project/simple_sitemap/-/blob/4.x/README.md) git.drupalcode.org · checked 2026-10-24
3. 03 [Simple XML sitemap settings form and defaults | Drupal.org](https://git.drupalcode.org/project/simple_sitemap/-/blob/4.x/src/Form/SettingsForm.php) git.drupalcode.org · checked 2026-10-24
4. 04 [Build and submit a sitemap | Google Search Central](https://developers.google.com/search/docs/crawling-indexing/sitemaps/build-sitemap) developers.google.com · checked 2026-10-24

Questions

## Asked a lot.

4 questions people ask next, answered from the sources on this page.

_01_ How do I create a sitemap in Drupal 10 or 11?

Install Simple XML sitemap 4.2 with Composer, enable it, configure entity types and bundles at `/admin/config/search/simplesitemap`, generate the file, then inspect `/sitemap.xml`.

_02_ Why does my Drupal sitemap only contain the homepage?

Simple XML sitemap requires you to enable entity types and bundles for inclusion. Check its entity settings and whether the relevant content is published and indexable.

_03_ Why does my Drupal sitemap use the wrong domain?

Generation from cron or the command line has no browser request to take the host from. Set Default base URL in the module's settings to the production origin and regenerate.

_04_ Does adding a URL to Drupal's sitemap make Google index it?

No. A sitemap helps Google discover URLs; Google says submitting one is a hint and does not guarantee crawling. Indexing is decided separately.

## Keep learning

[All platform guides](/seo)

[Learn Drupal SEO Content management systems](/seo/drupal) [Related Sitemap not found Crawlability](/seo-issues/sitemap-not-found) [Read next Drupal maintenance mode and SEO Content management systems](/seo/drupal/maintenance-mode) [Do Run a free site audit Free, about two minutes](/site-audit)

Nearby in platform guides
[Framer SEO](/seo/framer) [Framer favicon](/seo/framer/favicon)

More in Drupal SEO
[Drupal maintenance mode and SEO](/seo/drupal/maintenance-mode) [Drupal robots.txt](/seo/drupal/robots-txt) [Drupal URL redirects](/seo/drupal/redirects) [Drupal XML sitemap](/seo/drupal/xml-sitemap)

Terms on this page
[XML sitemap](/glossary/xml-sitemap) [Entity](/glossary/entity) [Indexability](/glossary/indexability) [Noindex](/glossary/noindex) [Landing page](/glossary/landing-page) [SERP](/glossary/serp) [Trailing slash in URLs](/glossary/trailing-slash) [HTTPS](/glossary/https)

Free · 2 minutes

## Tools point. Agencies advise. _This one ships._

Run the free audit, then approve the fixes. Every change can be undone.

[Audit my site free](/site-audit)

Free, no card 60 seconds Nobody will call you

- **46** fixes shipped without a ticket Brightpipe
- **0→7** ChatGPT citations in six weeks Paylane
