An XML sitemap is a text file written in Extensible Markup Language that uses a specific set of tags to list every important URL on your site. The file starts with an XML declaration and a urlset tag that references the sitemap protocol, then contains individual url entries for each page you want indexed. Each URL entry typically includes four elements. The loc tag specifies the full page URL. The lastmod tag shows when that page was last updated in YYYY-MM-DD format. The changefreq tag suggests how often the page changes—daily, weekly, monthly, or yearly. The priority tag assigns a value between 0.0 and 1.0 to indicate the page's relative importance within your site, though Google largely ignores this now. A basic structure looks like this: - XML declaration at the top - Opening urlset tag with namespace reference - Multiple url blocks, each containing loc, lastmod, changefreq, and priority - Closing urlset tag The file must be UTF-8 encoded and can contain up to 50,000 URLs or be 50MB uncompressed, whichever limit you hit first. If you exceed either, you split it into multiple sitemaps and reference them in a sitemap index file. At Ottawa SEO Inc., we generate sitemaps programmatically for our 500+ domain portfolio because manual updates become impossible at scale. We prioritize accuracy in lastmod dates since that signals fresh content to crawlers. We typically ignore changefreq because Google has stated it doesn't carry much weight, and we set priority uniformly or skip it entirely rather than spend time fine-tuning values that won't move the needle. The sitemap lives at yourdomain.com/sitemap.xml by convention, and you submit the URL through Google Search Console and Bing Webmaster Tools. The file itself is human-readable if you open it in a browser or text editor, but it's designed for bots. If you're using WordPress, Yoast or Rank Math generate these automatically. For custom builds, libraries in PHP, Python, or Node can create them during your build process.