A clean XML sitemap is short, only lists canonical live pages, and updates its lastmod date honestly. Most sitemap problems are not exotic; they come from sitemaps that list URLs the site itself no longer treats as canonical.

Below are sitemap examples you can copy: a single entry, a complete file, a sitemap index, the defaults on common platforms, and the image and hreflang variants, plus what a broken file looks like.
A minimal, correct sitemap entry
<url>
<loc>https://example.com/pricing/</loc>
<lastmod>2026-09-01</lastmod>
<changefreq>monthly</changefreq>
</url>
That is genuinely all Google needs: the canonical URL and an honest last-modified date. changefreq and priority are optional and largely ignored by modern crawlers. Do not spend time tuning them.
What does an XML sitemap look like in full?
The snippets above leave out the two lines people most often get wrong when they copy a sitemap example by hand: the XML declaration and the namespace on the root element. Without the namespace, Search Console reports the file as invalid even when every URL inside it is fine. This is what a complete, valid file looks like for a small SaaS site:
<?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-10-02</lastmod>
</url>
<url>
<loc>https://example.com/pricing/</loc>
<lastmod>2026-09-18</lastmod>
</url>
<url>
<loc>https://example.com/blog/onboarding-checklist/</loc>
<lastmod>2026-10-11</lastmod>
</url>
</urlset>
Three rules keep this sitemap example honest. Every loc is an absolute URL on the same host the sitemap lives on. The file stays under 50,000 URLs and 50 MB uncompressed, which are the limits in the sitemaps.org protocol. And the file is saved as UTF-8, because a stray character from a CMS export is enough to break parsing for the whole file.
A sitemap index for a multi-section site
<sitemapindex>
<sitemap><loc>https://example.com/sitemap-pages.xml</loc></sitemap>
<sitemap><loc>https://example.com/sitemap-posts.xml</loc></sitemap>
<sitemap><loc>https://example.com/sitemap-tools.xml</loc></sitemap>
</sitemapindex>
Splitting by content type (not by date or arbitrary batch) makes it easy to spot which section has a problem when Search Console reports errors against one sub-sitemap instead of the whole site.
What a broken sitemap looks like
- A URL that 301-redirects instead of returning 200 directly, and the destination should be listed, not the redirect.
- A URL that 404s because the page was deleted months ago and the sitemap was never regenerated.
- A non-canonical URL (a tracking-parameter or paginated variant) listed alongside its canonical version.
- A
lastmoddate that never changes, which trains Google to stop trusting the field on your site entirely.
Run your live sitemap through the Sitemap Checker to catch these automatically instead of spot-checking URLs by hand. For redirect chains specifically, see why 3xx redirects in a sitemap hurt crawling.
Sitemap examples by platform
You rarely write a sitemap by hand on a SaaS marketing site. The CMS writes it, and the useful skill is knowing where it lives and what it should contain. These are the default locations we check first on an audit:
| Platform | Default sitemap URL | What we usually find |
|---|---|---|
| WordPress core (no SEO plugin) | /wp-sitemap.xml | Author and tag sitemaps that nobody meant to submit |
| WordPress with Rank Math or Yoast | /sitemap_index.xml | A clean index split into post, page and category sitemaps |
| Webflow | /sitemap.xml | CMS placeholder items published by accident |
| Shopify | /sitemap.xml | An index pointing to product, collection, page and blog sitemaps |
If you run Webflow, our Webflow SEO guide covers how to keep placeholder CMS items out of the auto-generated file.
Image and hreflang sitemap examples
Two extensions are worth knowing because SaaS sites actually use them. An image sitemap entry adds the image namespace and lists images that belong to the page:
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
xmlns:image="http://www.google.com/schemas/sitemap-image/1.1">
<url>
<loc>https://example.com/templates/okr/</loc>
<image:image><image:loc>https://example.com/img/okr-template.png</image:loc></image:image>
</url>
</urlset>
A hreflang entry lists every language version of the page, including the page itself, using the xhtml namespace:
<url>
<loc>https://example.com/pricing/</loc>
<xhtml:link rel="alternate" hreflang="en" href="https://example.com/pricing/"/>
<xhtml:link rel="alternate" hreflang="de" href="https://example.com/de/preise/"/>
</url>
The hreflang version only works if every language URL lists the full set, including itself. That return-link rule is where most of the hreflang errors we see come from.
Quick recap: Sitemap examples
- A valid sitemap needs the XML declaration, the urlset namespace and absolute canonical URLs.
- Keep
lastmodhonest; skip time spent onchangefreqandpriority. - Split large sites into a sitemap index by content type, not by date.
- Stay under 50,000 URLs and 50 MB per file.
- Never list redirects, 404s or non-canonical variants.
- Check the default location for your CMS before writing anything by hand.
FAQ
What does an XML sitemap look like?
It is a plain XML file with a urlset root element and one url entry per page, each holding a loc tag with the full URL and, optionally, a lastmod date. The full example above is a complete working file.
Where do I find my website’s sitemap?
Try /sitemap.xml, /sitemap_index.xml and /wp-sitemap.xml, then check the Sitemap line in /robots.txt. Search Console’s Sitemaps report also lists any file already submitted.
Do I need a sitemap for a small site?
Google says a small, well-linked site may not need one, but we still add it. It costs nothing and gives you the Sitemaps report in Search Console, which is the fastest way to see indexing problems on a new site. Our guide to getting a website to show up on Google covers the rest of that setup.
Should a sitemap include every page?
No. Include only canonical pages you want indexed and that return 200. Thin tag archives, filtered URLs and thank-you pages stay out.
For the protocol itself, see sitemaps.org and Google’s guide to building a sitemap.
