An XML sitemap is a file that lists URLs you want search engines to crawl, along with optional metadata like last modification date and update frequency. For small sites under 500 pages, automatic generation through your CMS is usually sufficient. WordPress users should enable the sitemap feature in Yoast SEO or RankMath, which creates a sitemap at yourdomain.com/sitemap_index.xml. Shopify generates them automatically at yourdomain.com/sitemap.xml. For larger sites or custom setups, you'll need to build sitemaps programmatically. The XML structure follows sitemaps.org protocol: wrap URLs in <url> tags with <loc> for the URL itself, <lastmod> for last updated date, and optionally <changefreq> and <priority>. Keep individual sitemaps under 50MB and 50,000 URLs. If you exceed that, create a sitemap index file that references multiple sub-sitemaps. At Ottawa SEO, we exclude low-value pages from sitemaps across our 500+ domain portfolio: tag archives, search result pages, thank-you pages, and anything set to noindex. Including these wastes crawl budget. We also segment sitemaps by content type (posts, pages, products) to track indexing patterns in Search Console. After generating your sitemap, submit it through Google Search Console under Sitemaps and Bing Webmaster Tools. Add the sitemap location to your robots.txt file with a line like "Sitemap: https://yourdomain.com/sitemap.xml" so crawlers discover it automatically. Monitor the coverage report in Search Console weekly for the first month to catch excluded URLs or errors. Common mistakes: including canonicalized URLs (only list the canonical version), listing 404s or redirects, or setting every page to priority 1.0 which makes the signal meaningless. Update your sitemap when you publish significant new content or restructure your site, but don't obsess over real-time updates for minor edits. Search engines recrawl sitemaps on their own schedule anyway, typically every few days for established sites.