For the complete documentation index, see llms.txt. This page is also available as Markdown.

Sitemaps

Automatically generated XML sitemaps for your collections and taxonomies.

Sitemaps require the Pro edition.

Advanced SEO generates sitemaps for all of your collections and taxonomies. The sitemaps are organized in a sitemap index, accessible at /sitemap.xml.

Generating Sitemaps

Sitemaps are generated on demand whenever a sitemap is visited on the frontend. For content-heavy sites, you can pre-generate them with the following command:

php please seo:generate-sitemaps

Add the --queue flag to generate the sitemaps in the background:

php please seo:generate-sitemaps --queue

Make sure that your current environment is enabled for crawling. Otherwise, you won't be able to generate the sitemaps.

The recommended approach is to schedule the command:

Schedule::command('seo:generate-sitemaps --queue')->hourly();

You may change the storage path for generated sitemaps in the config:

'sitemap' => [
    'path' => storage_path('statamic/sitemaps'),
],

Disable Sitemaps

You may globally disable the sitemap feature in the config:

This removes all sitemap-related settings from the Control Panel and disables the sitemap frontend routes.

Disabling Collections & Taxonomies

You can disable sitemaps for individual collections and taxonomies using the Sitemap toggle in the collection/taxonomy configuration.

Sitemaps are also excluded when Noindex has been enabled in the collection/taxonomy defaults.

Excluding Individual Entries and Terms

An entry or term is excluded from the sitemap when any of the following conditions are met:

  • Sitemap toggle is disabled on the entry or term.

  • Noindex is enabled on the entry or term.

  • Canonical URL points to a different entry or a custom URL.

Domain Scoping

In multi-site setups with multiple domains, each domain gets its own sitemap index. Sitemaps only contain URLs from sites on that domain.

Setup
Sitemap Indexes

example.com, example.com/de, example.com/fr

One index on example.com

example.com, example.com/de, example.fr

One index on example.com, one on example.fr

example.com, example.de, example.fr

One index per domain

Hreflang tags are unaffected and continue to reference all localized versions across domains.

Custom Sitemaps

Advanced SEO automatically generates sitemaps for collections and taxonomies. If you need to include additional routes (like marketing pages or custom Laravel routes), you can register custom sitemaps using a class-based or inline approach. See Custom Sitemaps for details.

Last updated