Sitemaps

Updated 10 April 2026

Create manual sitemaps with hand-curated URLs or generate dynamic sitemaps automatically from your collection types.

Manual Sitemaps

Create hand-curated sitemaps with individual URLs or aggregate multiple sitemap files using sitemap indexes.

Sitemap Types

Type Emits When to use Entry expectations

Single sitemap

Hand-curated URLs (blogs, landing pages)

Each entry is a path or absolute URL; optional priority

Sitemap index

Aggregate internal/external sitemap files

Each entry points to another sitemap file

Single Sitemap (URL Set)

A single sitemap contains a list of URLs with optional metadata. Use this for:

  • Static pages (home, about, contact)
  • Important landing pages
  • Blog posts or articles
  • Any URLs you want to explicitly include

Configuration

  • Filename: The name of the XML file (e.g., pages.xml)
  • Base path: Optional path prefix for the sitemap URL
  • Entries: List of URLs (relative or absolute)
  • Priority: Optional priority value (0.0 to 1.0) for each URL

URL Resolution

Relative paths are automatically combined with:

  • Your configured frontend base URL
  • The sitemap’s base path (if set)

Example:

  • Base URL: https://example.com
  • Base path: /sitemaps
  • Entry: /about
  • Result: https://example.com/about

Sitemap Index

A sitemap index aggregates multiple sitemap files. Use this for:

  • Organizing large sites into multiple sitemaps
  • Referencing external sitemap files
  • Combining manual and collection sitemaps

Configuration

  • Filename: The name of the index XML file
  • Base path: Optional path prefix
  • Entries: Links to other sitemap files (can be relative or absolute URLs)

Example Entries

  • /sitemaps/pages.xml (relative, resolves to your base URL)
  • https://example.com/sitemaps/blog.xml (absolute)
  • https://external-site.com/sitemap.xml (external)

Best Practices for Manual Sitemaps

  • Keep URLs clean: Use relative paths when possible for easier maintenance
  • Set priorities wisely: Use priority values to indicate page importance (0.0 to 1.0)
  • Organize by purpose: Create separate sitemaps for different content types
  • Use indexes for large sites: If you have many URLs, split them into multiple sitemaps and use an index
  • Test your URLs: Use the preview feature in the admin panel to verify URLs resolve correctly

UI Features

  • Live URL preview: See how your URLs will resolve before saving
  • Validation: Required fields are checked before saving
  • Helper text: Contextual hints guide you through configuration
  • Error messages: Clear feedback when something goes wrong

Accessing Manual Sitemaps

Once created and permissions are granted, your manual sitemaps are accessible at:

  • /sitemaps/{filename}.xml – Individual sitemap files
  • /sitemaps/manual-sitemaps – Manual sitemap index (if configured)

These are also included in the root sitemap index at /sitemap.xml.

Collection Sitemaps

Generate dynamic XML sitemaps automatically from your Strapi collection types using pattern-based URLs.

Overview

Collection sitemaps automatically generate URLs for entries in your collection types. They’re perfect for:

  • Blog posts
  • Product pages
  • Article listings
  • Any content that follows a URL pattern

URL Patterns

Use tokens to build dynamic URLs from your collection fields:

Basic Pattern

/articles/[slug]

This pattern will generate URLs like:

  • https://example.com/articles/my-first-article
  • https://example.com/articles/another-article

Nested Fields

Access nested fields using dot notation:

/blog/[author.slug]/[slug]

This generates URLs like:

  • https://example.com/blog/john-doe/my-post

Multiple Tokens

Combine multiple fields in your pattern:

/products/[category]/[slug]

Configuration Options

Collection Type

Select the collection type you want to generate a sitemap for. Only published entries are included when Draft & Publish is enabled.

URL Pattern

Define the URL structure using field tokens. Available tokens:

  • [fieldName] – Direct field access
  • [relation.fieldName] – Nested field access

Entry Prefix

Optional prefix added before the pattern. Useful for organizing URLs:

  • Pattern: [slug]
  • Entry prefix: /blog
  • Result: /blog/my-article

Base Path

Optional base path for the sitemap URL itself (not the entry URLs).

Frequency

How often the content is likely to change:

  • always
  • hourly
  • daily
  • weekly
  • monthly
  • yearly
  • never

Priority

Priority value (0.0 to 1.0) indicating the relative importance of URLs in this sitemap.

Last Modified Field

Which field to use for the lastmod date:

  • updatedAt – When the entry was last updated
  • publishedAt – When the entry was published
  • createdAt – When the entry was created

Draft & Publish

When Draft & Publish is enabled for a collection type:

  • Only published entries are included in the sitemap
  • Draft entries are automatically excluded
  • When an entry is published, it’s automatically added to the sitemap
  • When an entry is unpublished, it’s automatically removed

Example Configuration

Blog Posts Collection

  • Collection Type: Blog Post
  • URL Pattern: /articles/[slug]
  • Entry Prefix: (empty)
  • Frequency: weekly
  • Priority: 0.8
  • Last Modified Field: updatedAt

Generated URLs:

  • https://example.com/articles/getting-started-with-strapi
  • https://example.com/articles/advanced-sitemap-configuration

Best Practices for Collection Sitemaps

  • Use meaningful patterns: Match your frontend routing structure
  • Choose appropriate frequency: Reflect how often content actually changes
  • Set realistic priorities: Use higher values for important content
  • Test your patterns: Ensure tokens resolve correctly for all entries
  • Monitor sitemap size: For very large collections, consider splitting into multiple sitemaps

Accessing Collection Sitemaps

Collection sitemaps are accessible at:

  • /api/strapi-advanced-sitemap/collection-sitemaps/{id}.xml

Where {id} is the ID of the collection sitemap configuration. These are also automatically included in the root sitemap index at /sitemap.xml.