Skip to main content

XML Sitemap Guide: Everything You Need to Know in 2026

Technical SEOJune 1, 2026 9 min read

XML sitemaps help search engines discover and index your pages. This guide covers creation, submission, and best practices.

What Is an XML Sitemap?

An XML sitemap is a file listing the URLs on your website that you want search engines to discover and index. It is not required — Google can find pages without one — but it significantly helps search engines understand your site structure, especially for large sites or those with complex navigation.

Basic Structure

<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
  <url>
    <loc>https://example.com/page</loc>
    <lastmod>2026-06-01</lastmod>
    <changefreq>weekly</changefreq>
    <priority>0.8</priority>
  </url>
</urlset>

Key Fields

  • loc — full URL including https://. Required.
  • lastmod — when the page was last significantly changed. Use ISO 8601 (YYYY-MM-DD).
  • changefreq — how often the page changes. Google does not always respect this.
  • priority — relative importance from 0.0 to 1.0. Only meaningful relative to your own pages.

Sitemap Index Files

For sites over 50,000 URLs or 50MB, use a sitemap index that references multiple individual sitemaps:

<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
  <sitemap><loc>https://example.com/sitemap-pages.xml</loc></sitemap>
  <sitemap><loc>https://example.com/sitemap-blog.xml</loc></sitemap>
</sitemapindex>

What to Include and Exclude

Include: All canonical URLs you want indexed — homepage, product pages, blog posts, key landing pages.

Exclude: Pages with noindex tags, admin pages, search result pages, paginated pages beyond page 2, duplicate/thin content, login-required pages.

Submitting to Search Engines

  1. Submit to Google Search Console under Indexing → Sitemaps
  2. Submit to Bing Webmaster Tools under Configure My Site → Sitemaps
  3. Reference in robots.txt: Sitemap: https://example.com/sitemap.xml

For automated sitemap scanning and API submission on top of sitemap discovery, see our Google indexing service and Search Console indexing workflow.

Ready to index your pages faster?

Start submitting URLs directly to Google, Bing, and Yandex. 7-day Pro trial, no credit card needed.

Start for free
SitemapTechnical SEOGoogle Search Console