Choose URLs you actually want discovered

Start with your published routes, CMS export, or a maintained list. Keep absolute URLs using the preferred scheme, host and path. Exclude duplicates, retired paths, redirects, and pages intentionally kept out of search. Compare a sample with the actual responses and canonicals before generating the file.

A workshop site might include its class listing and class details but omit preview versions and internal search URLs. Keep a query URL only when it identifies an intentional canonical page. The sitemap cannot resolve a conflict between the list and what the page serves.

Generate XML and review optional fields

Paste one URL per line into the generator, or use a CSV with a URL column and genuine optional metadata. This browser utility supports up to 1,000 URLs. Use a sitemap index or a build process for larger collections. The sitemap protocol limit for an individual file is 50,000 URLs or 50 MB uncompressed, whichever is reached first.

Add lastmod only when it records a real significant change to the page. Leave it out when you cannot establish the date. Google ignores priority and changefreq. In XML, escape ampersands in loc text while keeping the original URL meaning.

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

Try the XML Sitemap Generator →

Validate the file you serve

Publish at a stable public URL, commonly /sitemap.xml at the root. Check that the URL returns the XML with a successful status and no sign-in page. Validate the served file or paste its contents into the validator. An application fallback can return an HTML page with status 200 even when the XML file is missing.

Compare the deployed file with your inventory. Review the protocol's host and location rules before serving a sitemap from a nested path or using cross-site submission. If the sitemap is valid but a submitted URL redirects, fix the inventory and regenerate.

Try the XML Sitemap Validator →

Announce it and keep it current

Add the full sitemap URL to robots.txt or submit it in the appropriate Search Console property. A successful read means Google accessed the file. Diagnose missing pages separately by checking the page response, crawl directives, canonical, and indexed status where available.

Save the reviewed inventory with the deployment or automate it from canonical routes. After a migration, recheck retired paths and file freshness before asking search engines to revisit the sitemap.

References and further reading