Drupal Sitemap: Which Module to Use and How to Set It Up
Short answer: Drupal core does not create an XML sitemap. Install a contributed module: Simple XML Sitemap or XML sitemap. Both publish a sitemap for search engines, usually at /sitemap.xml. The module simply called Sitemap is different: it builds a site map page for visitors, not a file for Google.
Which Drupal Sitemap Module Do You Need?
The names are easy to mix up, and Google’s results for "drupal sitemap" show all three side by side. This is what each one does, according to its drupal.org project page (checked September 2026):
| Module | What it makes | Current release supports |
|---|---|---|
Simple XML Sitemap (simple_sitemap) | XML sitemaps for search engines, including hreflang (multilingual) and image sitemaps | Drupal 10.3+ and 11 |
XML sitemap (xmlsitemap) | An XML sitemap that follows the sitemaps.org standard, with submodules for content, menus, taxonomy and users | Drupal 10.3+ and 11 (older branch: Drupal 9 and 10) |
Sitemap (sitemap) | A human-readable page of links for visitors. Not an XML sitemap. | Drupal 10.2+ and 11 |
Both XML modules are maintained, so either works. Simple XML Sitemap is the common choice on new sites because multilingual and image support are built in. The rest of this guide uses it. If you already run XML sitemap and it works, there is no need to switch.
Install Simple XML Sitemap
Install it with Composer and enable it with Drush, or enable it from the Extend page in the admin:
composer require drupal/simple_sitemap drush en simple_sitemap -y
The settings live under Configuration → Search and metadata → Simple XML Sitemap. Once the sitemap has been generated, it is served at https://yoursite.com/sitemap.xml.
Choose What Goes Into the Sitemap
Nothing is included until you say so. In the module’s inclusion settings, turn inclusion on for each entity type and bundle you want listed, such as the Article content type or a taxonomy vocabulary. You can override the setting for a single node in its edit form.
A simple rule: include only pages you would be happy to see as a search result. In practice that usually means:
- Include: articles, products, landing pages, and taxonomy terms that have real content on their term pages.
- Leave out: basic pages used only as building blocks inside other pages, empty tag pages, webform submissions, comments and user profiles.
Use clean URLs. The sitemap lists each item’s URL. If an item has no URL alias, that is the raw path, such as /node/123 or /taxonomy/term/42. Install the Pathauto module and set alias patterns for each bundle, then regenerate the sitemap so it lists the aliased URLs.
Regenerate the Sitemap
Simple XML Sitemap builds the sitemap during cron runs, so new content appears after the next run. To rebuild it on demand, use the button in the module’s settings or Drush:
drush simple-sitemap:generate drush cr
If the sitemap looks out of date, check that cron is running: Reports → Status report shows when cron last ran.
Multilingual Sites
On a site with translations, Simple XML Sitemap can list each language version and link the translations to each other with hreflang alternate links inside the sitemap. That tells Google which version to show in which language. After changing language settings, regenerate the sitemap and spot-check that each translated page lists its alternates. For the rules behind this, see multilingual sitemaps.
Large Sites
A single sitemap file may hold at most 50,000 URLs (and 50 MB uncompressed). Simple XML Sitemap splits large sitemaps into several files for you and links them from an index, and you can lower the number of links per file in its settings. On very large sites, generation spreads across several cron runs; if it falls behind, run cron more often or generate from the command line.
Submit It to Google and Bing
In Google Search Console, open Sitemaps, enter sitemap.xml and submit. In Bing Webmaster Tools, add the same URL under Sitemaps, or import your site from Search Console. It also helps to add a line to robots.txt so every crawler can find it:
Sitemap: https://yoursite.com/sitemap.xml
Common Drupal Sitemap Problems
The sitemap lists the wrong domain
Sitemap links are absolute URLs. When the sitemap is generated by cron or Drush, Drupal may not know your public domain and can build links with a local or staging host. Simple XML Sitemap’s settings let you set a default base URL for this case; set it to your production domain and regenerate.
/node/123 URLs instead of friendly ones
The item has no alias. Set up Pathauto patterns for that bundle, bulk-generate aliases, then regenerate the sitemap.
Pages you don’t want in Google are listed
Usually a whole bundle is switched on, or a single node has an override. Turn off inclusion for the bundle, or remove the override on that node, then regenerate.
New content is missing
The sitemap only changes when cron runs. Check the status report for the last cron run, or regenerate with Drush.
Check the Result
Open https://yoursite.com/sitemap.xml and confirm you see your aliased URLs. For an outside check, the free sitemap finder reads your robots.txt, locates the sitemap, and tests 30 of its URLs for 404s, redirects, noindex tags and canonical problems.