Back to Blog
Guide

XML Sitemap Best Practices for 2026

January 22, 2026 8 min read

XML sitemaps remain one of the most important technical SEO elements for helping search engines discover and index your content. In this guide, we'll cover the essential best practices for creating effective sitemaps in 2026.

Sitemap Fundamentals

A sitemap is an XML file that lists URLs you want search engines to crawl. While search engines can discover pages through links, sitemaps help ensure important pages aren't missed---especially on large or complex sites.

<?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>2024-01-15</lastmod>
    <changefreq>weekly</changefreq>
    <priority>0.8</priority>
  </url>
</urlset>

Best Practice #1: Include Only Canonical URLs

Your sitemap should only include canonical, indexable URLs. Don't include:

  • URLs with noindex tags
  • Redirecting URLs (3xx)
  • Error pages (4xx, 5xx)
  • Duplicate content URLs
  • Paginated URLs (unless using rel="next/prev")
Including non-canonical URLs wastes crawl budget and can confuse search engines about which version of a page to index.

Best Practice #2: Keep Sitemaps Updated

A stale sitemap is almost as bad as no sitemap. Update your sitemap when:

  • New content is published
  • Existing content is significantly updated
  • Pages are removed (remove from sitemap too)
  • URL structures change

Best Practice #3: Use Accurate lastmod Dates

The lastmod element tells search engines when a page was last meaningfully updated. Don't set this to the current date on every build---only update it when the content actually changes.

Best Practice #4: Respect Size Limits

Search engines have strict limits:

  • 50,000 URLs maximum per sitemap file
  • 50MB maximum uncompressed file size

For larger sites, use a sitemap index file that references multiple sitemap files.

Best Practice #5: Submit and Monitor

After creating your sitemap:

  1. Add it to your robots.txt file
  2. Submit it in Google Search Console
  3. Submit it in Bing Webmaster Tools
  4. Monitor for errors and coverage issues

Priority and Changefreq: Do They Matter?

Google has stated they largely ignore priority and changefreq. However, they're still part of the sitemap protocol and some other search engines may use them. Include them if convenient, but don't stress over the values.

SH

SitemapHost Team

Insights on SEO, sitemaps, and web infrastructure.

Ready to simplify your sitemaps?

Start hosting your sitemaps with SitemapHost today.

Get Started Free