Technical API Guide

Created 10 April 2026

Complete reference for all sitemap endpoints and their usage.

Base URL

All endpoints are relative to your Strapi instance URL. For example, if your Strapi is running at https://example.com, the endpoints would be:

  • https://example.com/sitemap.xml
  • https://example.com/sitemaps/manual-sitemaps

Root Sitemap Index

GET

/sitemap.xml

Returns the root sitemap index containing references to all manual and collection sitemaps.

Response

XML format (application/xml)

<?xml version="1.0" encoding="UTF-8"?>
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
  <sitemap>
    <loc>https://example.com/sitemaps/pages.xml</loc>
  </sitemap>
  <sitemap>
    <loc>https://example.com/api/strapi-advanced-sitemap/collection-sitemaps/1.xml</loc>
  </sitemap>
</sitemapindex>

Required Permission

plugin::strapi-advanced-sitemap.controller.serveRootSitemap

Example

Curl command

https://example.com/sitemap.xml

Manual Sitemap Index

GET

/sitemaps/manual-sitemaps

Returns a sitemap index containing references to all manual sitemap files (if configured).

Response

XML format (application/xml)

<?xml version="1.0" encoding="UTF-8"?>
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
  <sitemap>
    <loc>https://example.com/sitemaps/pages.xml</loc>
  </sitemap>
  <sitemap>
    <loc>https://example.com/sitemaps/blog.xml</loc>
  </sitemap>
</sitemapindex>

Required Permission

plugin::strapi-advanced-sitemap.controller.serveManualSitemapIndex

Example

Curl command

https://example.com/sitemaps/manual-sitemaps

Individual Manual Sitemap File

GET

/sitemaps/{filename}.xml

Returns a specific manual sitemap file. The filename must match the configured filename in the admin panel.

Parameters

Parameter Type Description

filename

string

The filename of the sitemap (without .xml extension)

Response

XML format (application/xml)

<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
  <url>
    <loc>https://example.com/about</loc>
    <priority>0.8</priority>
  </url>
  <url>
    <loc>https://example.com/contact</loc>
    <priority>0.7</priority>
  </url>
</urlset>

Required Permission

plugin::strapi-advanced-sitemap.controller.serveManualSitemapFile

Example

Curl command

https://example.com/sitemaps/pages.xml

Collection Sitemap File

GET

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

Returns a collection sitemap file generated from a collection type. The ID corresponds to the collection sitemap configuration ID.

Parameters

Parameter Type Description

id

integer

The ID of the collection sitemap configuration

Response

XML format (application/xml)

<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
  <url>
    <loc>https://example.com/articles/getting-started</loc>
    <lastmod>2024-01-15T10:30:00Z</lastmod>
    <changefreq>weekly</changefreq>
    <priority>0.8</priority>
  </url>
  <url>
    <loc>https://example.com/articles/advanced-guide</loc>
    <lastmod>2024-01-20T14:45:00Z</lastmod>
    <changefreq>weekly</changefreq>
    <priority>0.8</priority>
  </url>
</urlset>

Required Permission

plugin::strapi-advanced-sitemap.controller.serveCollectionSitemapFile

Example

Curl command

https://example.com/api/strapi-advanced-sitemap/collection-sitemaps/1.xml

HTTP Status Codes

Code Description

200

Success – Sitemap returned successfully

401

Unauthorized – Required permission not granted

404

Not Found – Sitemap file or configuration not found

Content-Type

All sitemap endpoints return XML content with the following content type:

Content-Type: application/xml; charset=utf-8

Search Engine Integration

Submit your root sitemap to search engines:

  • Google Search Console: Add /sitemap.xml to your sitemaps
  • Bing Webmaster Tools: Submit /sitemap.xml
  • robots.txt: Add Sitemap: https://example.com/sitemap.xml