XML Sitemap Example and Format (Copy-Paste Template)

Short answer: An XML sitemap is a text file that lists the URLs you want search engines to crawl, one <url> block per page, with a <loc> (the address) and optionally a <lastmod> (when it really changed). Save it as sitemap.xml at your site root, list only canonical pages that return 200, and submit it in Search Console.

People often ask what one actually looks like. Here it is.

A minimal valid sitemap

<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
  <url>
    <loc>https://wizetool.com/</loc>
    <lastmod>2026-10-30</lastmod>
  </url>
  <url>
    <loc>https://wizetool.com/guides/on-page-seo-checklist/</loc>
    <lastmod>2026-10-28</lastmod>
  </url>
</urlset>

That's the whole format. Open yours in a browser at /sitemap.xml and you should see something very similar.

What each tag does

  • <urlset> wraps everything and declares the sitemap standard.
  • <url> is one page.
  • <loc> is the full address: https://, correct host, correct trailing slash. It must match the canonical URL.
  • <lastmod> is the date the page's content last changed in a meaningful way. Update it only when it did. If every URL shows today's date every day, Google learns to ignore it.
  • <changefreq> and <priority> appear in many old tutorials. Google has said it ignores them. Leave them out.

Rules worth remembering

  1. One sitemap file: up to 50,000 URLs or 50 MB uncompressed. Beyond that, split into several files and list them in a sitemap index.
  2. UTF-8 encoding, and special characters in URLs escaped (& becomes &amp;).
  3. Absolute URLs only. No relative paths.
  4. Same host. A sitemap on wizetool.com should list wizetool.com URLs, not www or http versions.
  5. Only pages you want indexed. Skip redirects, 404s, noindex pages and duplicate versions.

Sitemap index example

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

Handy for organising by section. It also makes the Search Console report easier to read, because you can see indexing per sitemap.

wizetool.com sitemap index file at /sitemap.xml, listing the child sitemaps

How to tell Google about it

  • Add this line to robots.txt: Sitemap: https://wizetool.com/sitemap.xml
  • In Search Console go to Sitemaps, enter the path, and press Submit.
  • Check "Status". Success means Google could read it. It does not mean every page will be indexed.
Search Console Sitemaps page for wizetool.com, showing submitted sitemaps with Success status

Common mistakes

  • Listing redirected URLs. If /old/ redirects to /new/, list only /new/. See how to set up 301 redirects.
  • Mixing http, https, www and non-www. This is a classic duplicate-content setup. Our guide on duplicate URLs and canonical tags explains the cleanup.
  • Including noindex pages. You're sending Google contradictory instructions.
  • Fake lastmod dates. Honest dates build trust with crawlers.
  • Thinking a sitemap forces indexing. It doesn't. It helps discovery. Quality and links decide the rest. We cover the limits in XML sitemaps: what they do and do not do.

Quick checklist

  • Opens at /sitemap.xml and is valid XML
  • Only canonical, 200, indexable URLs
  • Correct host and protocol everywhere
  • Honest lastmod
  • Referenced in robots.txt
  • Submitted in Search Console
  • Re-checked after big changes

FAQ

Do small sites need a sitemap? If your internal linking is good and the site is small, Google can find pages without one. It's still cheap insurance for a new site, and it gives you indexing reports.

Can I generate it automatically? Yes. Most CMSs and static site generators do. If a plugin is generating it, still open the file and read it. Generated doesn't mean correct.

Where should it live? At the root (/sitemap.xml) is simplest. A sitemap can only list URLs at or below its own path unless submitted through Search Console for that property.

What about image or video sitemaps? They're extra extensions for media-heavy sites. Start with a plain one.

Sources