Strapi plugin logo for Strapi Advanced Sitemap

Strapi Advanced Sitemap

SEO-ready XML sitemaps for Strapi CMS. Create manual URL sets or sitemap indexes, generate dynamic feeds from collection types, and expose every endpoint behind role-based permissions no external services required.

thumbnail for Strapi Advanced Sitemap

🚀 Strapi Advanced Sitemap

npm version License: MIT Strapi

SEO-ready XML sitemaps for Strapi CMS. Create manual URL sets or sitemap indexes, generate dynamic feeds from collection types, and expose every endpoint behind role-based permissions—no external services required.

📦 NPM Package: @webbycrown/strapi-advanced-sitemap
💻 Repository: GitHub – webbycrown/strapi-advanced-sitemap


✨ Features

🗂️ Manual Sitemap Builder

  • Single sitemap (<urlset>): curate individual URLs with optional priority values
  • Sitemap index (<sitemapindex>): reference other sitemap files (internal or external)
  • Automatic URL resolution: combine relative paths with your site base URL
  • UI hints & validation: friendly helper text, required field checks, URL previews

🔁 Dynamic Collection Sitemaps

  • Pattern-based URLs: use tokens like /blog/[slug] (supports nested fields)
  • Entry prefix & base path: compose clean URLs without extra middleware
  • Frequency, priority, lastmod: configure crawl metadata per sitemap
  • Draft filtering: includes only published entries from Draft & Publish collections

🔒 Permission-Aware Delivery

  • Role gating: every endpoint maps to an action (plugin::strapi-advanced-sitemap.controller.*)
  • Public crawler control: enable only the endpoints you want search engines to reach
  • API token support: respect token-bound permissions for programmatic access

🛠️ Admin-First Workflow

  • Inline editing: manage everything from Settings → Strapi Advanced Sitemap
  • Frontend base URL control: store the live site origin once and reuse it across manual and collection previews
  • Instant feedback: clear success/error messages plus live URL previews for every manual entry
  • No redeploys: sitemap definitions are stored in Strapi entities

📸 Feature Screens

Configure Sitemap Page

Configure Sitemap Page

Permissions in Public Role Screen

Permissions in Public Role Screen

Manual Sitemap Settings (Sitemap Index)

Manual Sitemap Settings (Sitemap Index)

Manual Sitemap Settings (URL Set)

Manual Sitemap Settings (Url Set)

Collection Sitemap Settings

Collection Sitemap Settings

Collection Sitemap Entry

Collection Sitemap Entry


🛠️ Installation

Via npm

npm install @webbycrown/strapi-advanced-sitemap

Via yarn

yarn add @webbycrown/strapi-advanced-sitemap

Enable the plugin

Update config/plugins.js:

1module.exports = {
2  'strapi-advanced-sitemap': {
3    enabled: true,
4  },
5};

Restart Strapi and rebuild the admin panel:

npm run build
npm run develop

⚡ Quick Start

  1. Open the admin panelSettings → Strapi Advanced Sitemap
  2. Add a manual sitemap (single or index) and configure filename/base path
  3. Add entries
    • Single sitemap: supply URLs (relative or absolute) + optional priorities
    • Index sitemap: supply links to other sitemap files
  4. Add a collection sitemap: pick a collection type, define a pattern (e.g. /articles/[slug]), and adjust metadata
  5. Grant permissions: Settings → Users & Permissions → Roles → Public (or another role) → enable the sitemap actions:
    • serveRootSitemap
    • serveManualSitemapIndex
    • serveManualSitemapFile
    • serveCollectionSitemapFile

Available Endpoints

  • /sitemap.xml – root sitemap index (manual + collection entries)
  • /sitemaps/manual-sitemaps – manual sitemap index (if configured)
  • /sitemaps/{filename}.xml – individual manual sitemap files
  • /api/strapi-advanced-sitemap/collection-sitemaps/{id}.xml – collection XML (also linked from the root)

🧭 Manual Sitemap Types

TypeEmitsWhen to useEntry expectations
Single sitemap<urlset>Hand-curated URLs (blogs, landing pages)Each entry is a path or absolute URL; optional priority
Sitemap index<sitemapindex>Aggregate internal/external sitemap filesEach entry points to another sitemap file

Relative paths are automatically combined with your configured base URL and per-sitemap base path.


🧱 Collection Sitemap Patterns

  • Use [fieldName] tokens (nested allowed: [author.slug]) to build URLs
  • Combine with “Entry prefix” or “Base path” to match your routing strategy
  • lastmod draws from updatedAt, publishedAt, or createdAt
  • Draft entries are excluded when Draft & Publish is enabled

Example pattern:

1/articles/[slug]

🔐 Permissions & Security

  • Actions live under plugin::strapi-advanced-sitemap.*
  • Denied roles receive 401 Unauthorized responses
  • API tokens respect the same action mapping
  • Manual sitemaps store relative paths only—final URLs are resolved server side

🧪 Troubleshooting

SymptomFix
Sitemap returns 401Enable the corresponding plugin actions for that role
Manual sitemap URL 404sCheck filename + base path, ensure “Save changes” was clicked
Collection sitemap emptyVerify entries are published and the pattern resolves without leftover tokens
Admin UI staleRun npm run build and restart Strapi

📝 License

MIT – see LICENSE for details.


🆘 Support

🙏 Acknowledgments

  • Built for the amazing Strapi community
  • Inspired by modern form design principles
  • Thanks to all contributors and users

📊 Changelog

v1.0.0

  • ✨ Initial release of Strapi Advanced Sitemap
  • 🧭 Manual sitemap builder supporting URL sets and sitemap indexes
  • ⚙️ Dynamic collection sitemaps powered by pattern tokens
  • 🔐 Role-based access control for each sitemap endpoint
  • 🌍 Configurable frontend base URL with live preview inside the admin panel
  • 📦 Easy integration and management from Strapi settings
  • 🚀 Published to NPM: @webbycrown/strapi-advanced-sitemap

Made with ❤️ by WebbyCrown

Install now

npm install @webbycrown/strapi-advanced-sitemap

STATS

3 GitHub starsNot downloaded this week

Last updated

39 days ago

Strapi Version

5.12.5 and above

Author

github profile image for WebbyCrown
WebbyCrown

Useful links

Create your own plugin

Check out the available plugin resources that will help you to develop your plugin or provider and get it listed on the marketplace.