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.
🚀 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.
📦 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
Permissions in Public Role Screen
Manual Sitemap Settings (Sitemap Index)
Manual Sitemap Settings (URL Set)
Collection Sitemap Settings
Collection Sitemap Entry
🛠️ Installation
Via npm
npm install @webbycrown/strapi-advanced-sitemapVia yarn
yarn add @webbycrown/strapi-advanced-sitemapEnable 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
- Open the admin panel → Settings → Strapi Advanced Sitemap
- Add a manual sitemap (single or index) and configure filename/base path
- Add entries
- Single sitemap: supply URLs (relative or absolute) + optional priorities
- Index sitemap: supply links to other sitemap files
- Add a collection sitemap: pick a collection type, define a pattern (e.g.
/articles/[slug]), and adjust metadata - Grant permissions: Settings → Users & Permissions → Roles → Public (or another role) → enable the sitemap actions:
serveRootSitemapserveManualSitemapIndexserveManualSitemapFileserveCollectionSitemapFile
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
| Type | Emits | When to use | Entry 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 files | Each 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
lastmoddraws fromupdatedAt,publishedAt, orcreatedAt- 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 Unauthorizedresponses - API tokens respect the same action mapping
- Manual sitemaps store relative paths only—final URLs are resolved server side
🧪 Troubleshooting
| Symptom | Fix |
|---|---|
| Sitemap returns 401 | Enable the corresponding plugin actions for that role |
| Manual sitemap URL 404s | Check filename + base path, ensure “Save changes” was clicked |
| Collection sitemap empty | Verify entries are published and the pattern resolves without leftover tokens |
| Admin UI stale | Run npm run build and restart Strapi |
📝 License
MIT – see LICENSE for details.
🆘 Support
- Documentation: GitHub Wiki
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Email: info@webbycrown.com
🙏 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
Install now
npm install @webbycrown/strapi-advanced-sitemap
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.