Skip to content

Sitemaps

Total CMS generates XML sitemaps for collections and builder pages, with a sitemap index that crawlers can discover via robots.txt.

The index lists every sitemap available on the site and is served at two paths:

/sitemap.xml
/sitemap

The .xml form is what crawlers conventionally expect to find declared in robots.txt. Both URLs return the same XML.

The index automatically includes:

  • The pages sitemap (/sitemap/-pages) when the builder pages collection exists
  • One entry per collection that has been opted in via the Sitemap card on the collection edit form

Collections that haven’t been opted in are silently omitted, and /sitemap/{collection} returns 404 for them. This keeps disabled or unconfigured collections completely off the public surface — useful for collections that hold sensitive data.

Sitemap: https://example.com/sitemap.xml

Each collection has a Sitemap card on its edit form (/admin/collections/{collection}/edit). The card persists the following settings:

SettingWhat it does
Include in SitemapMaster toggle. Off → /sitemap/{collection} returns 404 and the collection is omitted from the index.
Date PropertyObject property used for <lastmod>. Pulled from the collection’s object schema. Defaults to updated.
Change FrequencyHint for crawlers (always, hourly, daily, weekly, monthly, yearly, never). Most search engines treat this as advisory.
PriorityDefault crawl priority for objects (0.0 to 1.0).
Include FilterOnly include objects matching this expression (e.g. published:true).
Exclude FilterSkip objects matching this expression (e.g. draft:true).
ImagesImage and gallery properties to list under each object. See Images and Videos.
VideosVideo properties to list under each object. See Images and Videos.

Saving the collection writes these into the collection’s .meta.json under a sitemap block. The /sitemap/{collection} route reads them as defaults — no query string required for routine use.

A sitemap can also list the images and videos on each object’s page. Search engines find an image in an <img> tag on their own. What they miss are images that load later: a gallery’s full-size images in a lightbox, or objects that Load More brings in. Listing them in the sitemap is how those get into image search.

Name the properties in the collection’s Sitemap card:

  • Images offers the schema’s image and gallery properties. A gallery lists every image in it, up to 1,000 per object.
  • Videos offers the schema’s video properties.

Choose only the images that are the page’s own content, such as a post’s photo or a product’s gallery. Leave out an author’s photo or an icon.

Each image is listed as an ImageWorks address 1,600px wide, so it carries the schema’s watermark and is the same image visitors see:

<url>
<loc>https://example.com/blog/harvest-trip</loc>
<image:image>
<image:loc>https://example.com/imageworks/blog/harvest-trip/image.jpg?w=1600&amp;cache=4bb8c592</image:loc>
</image:image>
</url>

Google requires a thumbnail, a title and a description for each video, and a video without a thumbnail is left out:

TagComes from
video:thumbnail_locThe video’s uploaded poster, else the thumbnail its provider supplies
video:titleThe video’s own title, else the object’s title, else the page title
video:descriptionThe page’s meta description, else the title
video:player_locThe provider’s player, for YouTube, Vimeo and the other services the video field knows
video:content_locThe file itself, for a video file such as an .mp4

A link to a video page the video field does not recognize is left out, since there is no player to point to.

Objects excluded from the sitemap, or with No Index on, list nothing. The social share image is never listed: it is not on the page.

Naming any property here means each object is read in full when the sitemap is built, not just the collection index. On a collection of many thousands of objects, the sitemap takes longer to build.

When the builder pages collection exists, the pages sitemap is served at:

/sitemap/-pages

The leading - keeps it from colliding with a user collection literally named pages. The index references this path automatically.

Each builder page has its own sitemap controls in the page form: an Include in Sitemap toggle, a Change Frequency select, and a Priority number — analogous to the collection-level card but per page. Dynamic routes (containing { placeholders, e.g. /blog/{id}) are skipped automatically since they can’t be enumerated from the route alone.

Both sitemaps skip any entry whose SEO card has No Index turned on — a builder page and a collection object alike. A crawler told noindex in the page head and handed the same URL in a sitemap is receiving two contradictory instructions, so Total CMS only ever sends one.

This is separate from the Include in Sitemap toggle. That toggle keeps a record out of the sitemap without asking anyone not to index it; No Index does both. For collections other than the builder pages, the schema’s index array must contain seo for the exclusion to take effect — the sitemap builders read the collection index, not the object files.

See SEO for the card and how to add it to your own schemas.

Generate a sitemap for the objects in any opted-in collection:

/sitemap/{collection}

For example:

/sitemap/blog
/sitemap/products

URLs of disabled collections return 404 — this is intentional so that the existence of a sitemap-disabled collection is not exposed to crawlers or attackers.

The collection’s saved Sitemap card settings act as defaults. URL parameters still work for one-off tweaks and override the saved values:

# Override the date property for one request
/sitemap/blog?date=created
# Override the saved exclude filter
/sitemap/blog?exclude=draft,archived
# Override frequency and priority
/sitemap/blog?frequency=daily&priority=0.8

This preserves backward compatibility with workflows that built sitemap URLs by hand. The saved settings reduce the need for query strings, but they don’t remove the ability to use them.

Security note: URL parameters cannot bypass the Include in Sitemap toggle. A disabled collection always returns 404 regardless of query string.

The include and exclude settings — whether saved on the collection or passed as URL parameters — control which objects appear in the sitemap.

📖 See Index Filter Documentation for complete filtering syntax and examples.

# Exclude draft posts
/sitemap/blog?exclude=draft
# Only featured posts
/sitemap/blog?include=featured
# Only published, non-private posts
/sitemap/blog?include=published&exclude=draft,private
# Only in-stock products
/sitemap/products?include=instock&exclude=discontinued
  • Include: ?include=property:value — Object must match ALL criteria
  • Exclude: ?exclude=property:value — Object excluded if it matches ANY criteria
  • Shorthand: ?include=featured — Defaults to featured:true
  • Multiple: Use commas to separate multiple filters

For complete filtering documentation including boolean/string handling, multi-criteria, precedence, and PHP usage examples, see the Index Filter Documentation.

  • Existing sitemap URLs continue to work — once a collection is opted in via the Sitemap card, /sitemap/{collection} behaves the same as before.
  • The legacy filter URL parameter is still supported and automatically mapped to include.
  • Saved Sitemap card settings act as defaults; URL parameters override them on a per-request basis.
  • A collection without an enabled Sitemap card returns 404 — both at the per-collection URL and absent from the index.
  • The 404 response is identical to a missing-resource 404, so the existence of a disabled-but-present sitemap configuration is not leaked.
  • The Include in Sitemap toggle is the single source of truth — URL parameters cannot bypass it.