Configures the XML sitemap at /sitemap.xml. Set changefreq and priority per content type, include or exclude whole types, and automatically ping Google and Bing when content is published.
- Per-type configuration - set
changefreqandpriorityindependently for the homepage, blog index, pages, posts, and taxonomy archive pages - Include / exclude - toggle each content type on or off without affecting others
- Search engine pings - automatically pings Google and Bing whenever a content item is published or a scheduled item goes live
- Live sitemap preview - link to
/sitemap.xmldirectly from the settings page - Zero configuration - sensible defaults work out of the box; install and forget
The core Contensio sitemap at /sitemap.xml builds a URL list and passes it through the contensio/seo/sitemap-urls filter. This plugin hooks into that filter to:
- Remove URLs whose type is disabled in settings.
- Override
changefreqandprioritywith the configured values.
On publish, the plugin listens on contensio/content/status-changed (and contensio/content/published for scheduled items). When content transitions to published, it fires HTTP pings to the configured search engines in a best-effort manner - a failed ping is logged but never interrupts the publish action.
Go to Plugins in your Contensio admin, find Sitemap Generator, and click Install.
composer require contensio/plugin-sitemapThe plugin is auto-discovered. Go to Plugins in the admin and enable it. No migration is needed - settings are stored in the core settings table.
| Type | Description |
|---|---|
| Homepage | The site root (/) |
| Blog index | The /blog listing page |
| Pages | All published static pages |
| Posts | All published blog posts |
| Taxonomies | Category and tag archive pages |
For each type you can:
- Include - check to include in the sitemap; uncheck to exclude entirely
- Change frequency - hint to crawlers how often the content changes (
always/hourly/daily/weekly/monthly/yearly/never) - Priority - relative importance within your site (
1.0= highest,0.1= lowest)
| Setting | Description |
|---|---|
| Ping Google | Sends GET https://www.google.com/ping?sitemap=… on each publish (deprecated by Google in 2023 - submit via Search Console for reliable indexing) |
| Ping Bing | Sends GET https://www.bing.com/webmaster/ping.aspx?siteMap=… on each publish |
| Type | Included | changefreq | priority |
|---|---|---|---|
| Homepage | ✓ | daily | 1.0 |
| Blog index | ✓ | daily | 0.9 |
| Pages | ✓ | weekly | 0.7 |
| Posts | ✓ | weekly | 0.6 |
| Taxonomies | ✓ | weekly | 0.5 |
| Method | URL | Description |
|---|---|---|
GET |
/account/settings/sitemap |
Sitemap settings page |
POST |
/account/settings/sitemap |
Save sitemap settings |
The sitemap itself is served by the core at /sitemap.xml - this plugin configures it, not replaces it.
Other plugins can also modify the sitemap URL list by registering on the same filter:
use Contensio\Support\Hook;
Hook::addFilter('contensio/seo/sitemap-urls', function (array $urls): array {
// Add a custom URL
$urls[] = [
'type' => 'custom',
'loc' => url('/my-custom-page'),
'lastmod' => now()->toAtomString(),
'changefreq' => 'monthly',
'priority' => '0.4',
];
return $urls;
});Each URL entry is an associative array with loc, lastmod, changefreq, priority, and an optional type key. The type key is internal metadata - it is stripped before XML output.
- PHP 8.2+
- Contensio 2.0+
AGPL-3.0-or-later - see LICENSE.