Drupal core doesn't generate an XML sitemap on its own — you need a contributed module. The overwhelming majority of Drupal sites use Simple XML Sitemap for this, so that's the path this guide covers, along with what to check once it's running.
Where Is My Drupal Sitemap?
With Simple XML Sitemap installed and configured, your sitemap is at:
yourdomain.com/sitemap.xml
If the site has more than one language enabled, each language gets its own child sitemap (/sitemap.xml?_format=xml&language=fr and similar), referenced from an index at the same /sitemap.xml URL.
Setting Up Simple XML Sitemap
- Install the module: via Composer (
composer require drupal/simple_sitemap) or by downloading it from the Drupal module repository, then enable it under Extend. - Go to Configuration → Search and metadata → Simple XML Sitemap.
- Under the Entity types tab, choose which content types (Article, Page, and any custom bundles) are included, and set a default priority and change frequency per type. These per-type defaults are Drupal-side settings only — Google itself ignores the priority and changefreq values in the generated XML.
- Save configuration, then click Rebuild sitemap to generate it for the first time.
Excluding Specific Content
Two ways to keep a page out of the sitemap:
- Per content type — uncheck the type entirely under the Entity types tab if nothing of that type should ever be indexed.
- Per node — edit the individual node, open the Simple XML Sitemap tab in the edit form, and set it to excluded. This is the right approach for a handful of pages within an otherwise-included content type — an unpublished landing page or an internal-only page, for example.
Common Drupal Sitemap Problems
Sitemap returns a 404
Confirm the module is actually enabled under Extend, then clear the cache (drush cr or Configuration → Performance → Clear all caches). Drupal's router cache in particular can keep serving a 404 for the sitemap path until it's cleared, even after the module is properly configured.
Sitemap is stale after publishing new content
Simple XML Sitemap doesn't regenerate on every single save by default — it rebuilds on a cron schedule. Confirm Drupal cron is actually running (Configuration → System → Cron), or trigger a manual rebuild from the sitemap settings page after a bulk content change.
Aggressive page caching serves an old sitemap
If a reverse proxy or CDN caches /sitemap.xml for a long TTL, Search Console can be reading a stale file even after Drupal has rebuilt it internally. Set a short cache lifetime specifically for the sitemap path, or purge it as part of your deployment process.
Unpublished or access-restricted nodes appear in the sitemap
Simple XML Sitemap should exclude unpublished nodes automatically, but custom access control modules (content moderation workflows, permission-restricted content types) can create pages that are technically "published" in Drupal's eyes but not actually reachable by an anonymous visitor. Spot-check a sample of sitemap URLs while logged out to confirm what search engines actually see.
Submitting Your Drupal Sitemap to Google
- Open Google Search Console and select your property.
- Click Sitemaps in the left sidebar.
- Enter
sitemap.xmland click Submit.
You only need to submit once — Google re-fetches it on its own schedule from then on. See XML sitemap best practices for what actually affects re-crawl frequency, and how to validate a sitemap before you submit if you've made manual changes to the configuration.