What Does a Sitemap Look Like?

An XML sitemap is a plain text file: a list of URLs wrapped in a few tags. You can open almost any site’s sitemap in a browser to see one, often at /sitemap.xml.

A minimal example

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

What each tag does

  • <urlset> wraps the file and declares the protocol.
  • <url> holds one entry.
  • <loc> is the full, canonical address of the page. It’s the only required detail.
  • <lastmod> is when the page last changed significantly. Google uses it when it proves accurate.

You’ll also see <changefreq> and <priority> in the wild. They’re part of the protocol, but Google ignores both.

Sitemap indexes

A single sitemap file is limited to 50,000 URLs or 50 MB uncompressed. Larger sites split their URLs across several files and list those in a sitemap index, using the same idea with <sitemapindex> and <sitemap> tags. Many tools do this by default, even on small sites, with separate files for posts, pages and categories.

Other formats

XML is the most common and the most capable, with extensions for images, video and news. Search engines also accept RSS or Atom feeds and plain text files with one URL per line.

Where it lives and what goes in it

The name sitemap.xml is a convention rather than a requirement. A sitemap at your site’s root can cover the whole site, and you can point crawlers to it with a Sitemap: line in robots.txt. Include every canonical page you want indexed, and leave out anything you don’t.


Posted

in

by