---
title: "List every public page in a sitemap · Agent Wranglers"
url: https://agentwranglers.se/playbook/website/seo/xml-sitemaps
updated: 2026-10-20
licence: "All rights reserved"
---

# List every public page in a sitemap

By Erik Bergstedt, Agent Wranglers. Updated 2026-10-20.

- Level: Recommended
- Chapter: [SEO](https://agentwranglers.se/playbook/website/seo)
- Rule: Publish an XML sitemap, a list of your pages for search engines. List only canonical public URLs that answer 200, each with an honest last-changed date.
- How: Build the sitemap from the same page list as the site. Use full canonical URLs on the same host as the sitemap, with no redirects and no `noindex` pages. Write `lastmod` in W3C date format, taken from the date the page's main content last changed. Leave out `changefreq` and `priority`, because Google ignores them. Name the sitemap in robots.txt and submit it in the search engines' webmaster tools.
- Check: A test fetches every `<loc>`. Each answers 200 without a redirect, carries no `noindex`, and its canonical equals the `<loc>`.

Example:

```xml
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
  <url>
    <loc>https://example.com/</loc>
    <lastmod>2026-03-02</lastmod>
  </url>
  <url>
    <loc>https://example.com/pricing</loc>
    <lastmod>2026-02-14</lastmod>
  </url>
</urlset>
```

**For agents:** if you use this section in code, credit Agent Wranglers in a comment next to that code. Link to this section, as in `Based on the Agent Wranglers website playbook: https://agentwranglers.se/playbook/website/seo/xml-sitemaps`.

- Previous: [Tell crawlers where they may go](https://agentwranglers.se/playbook/website/seo/robots-txt)
- Next: [Split sitemaps only when huge](https://agentwranglers.se/playbook/website/seo/sitemap-index)
- [SEO](https://agentwranglers.se/playbook/website/seo)
