NitroSERP

March 5, 2026·5 min read·By NitroSERP Editorial Team

Updated

XML Sitemap Best Practices: Limits & lastmod (2026)

Build a valid XML sitemap with canonical URLs, accurate lastmod dates, sitemap indexes, and fixes for common Google Search Console indexing gaps.

An XML sitemap (sitemap.xml) is a machine-readable file following the sitemaps.org 0.9 protocol that lists a website's canonical, indexable URLs alongside optional <lastmod> timestamps so search engine crawlers (Googlebot, Bingbot) and AI search bots can discover new and updated pages efficiently.

To build a clean sitemap.xml file for your site right now, paste your canonical URLs into our free XML sitemap generator.


2026 XML Sitemap Protocol Specifications & Google Support

Not every tag in the XML sitemap specification is used by Google today. Here is how modern search crawlers process each element:

XML Tag / LimitProtocol RuleGoogle Support (2026)Best Practice
Max URLs per Sitemap50,000 <url> entries max per fileEnforced strictlySplit larger inventories using a <sitemapindex> file
Max Uncompressed Size50 MB (52,428,800 bytes) maxEnforced strictlyCompress large sitemaps with gzip (sitemap.xml.gz)
<loc>Full, absolute UTF-8 escaped URLRequired & UsedMust match exact canonical (https://, www vs non-www, trailing slash)
<lastmod>W3C Datetime (YYYY-MM-DD or ISO 8601)Used for Recrawl SchedulingOnly update when page content or structured data materially changes
<changefreq>daily, weekly, monthly, etc.Ignored by GooglebotSafe to omit or leave as a static hint
<priority>0.0 to 1.0 relative scoreIgnored by GooglebotSetting every page to 1.0 has zero effect on crawl priority

Copy-and-Paste Valid sitemap.xml & sitemap_index.xml Examples

1. Standard Single sitemap.xml (Under 50,000 URLs)

<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
  <url>
    <loc>https://www.nitroserp.com/</loc>
    <lastmod>2026-10-22</lastmod>
  </url>
  <url>
    <loc>https://www.nitroserp.com/tools/xml-sitemap-generator</loc>
    <lastmod>2026-10-22</lastmod>
  </url>
  <url>
    <loc>https://www.nitroserp.com/blog/xml-sitemap-best-practices-2026</loc>
    <lastmod>2026-10-22</lastmod>
  </url>
</urlset>

2. Sitemap Index File (For Sites with Multiple Content Types or >50,000 URLs)

Even if your site has fewer than 50,000 URLs, splitting your sitemaps by page type (sitemap-tools.xml, sitemap-blog.xml, sitemap-categories.xml) makes it easy to filter Google Search Console → Page Indexing reports by section:

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

The "Dirty Sitemap" Anti-Patterns: What to Never Put in sitemap.xml

Including non-canonical or error URLs in your sitemap wastes crawl budget and triggers warnings in Google Search Console. Audit your sitemap and remove:

  1. 301 or 302 Redirecting URLs: If /old-slug redirects to /new-slug, remove /old-slug from the sitemap and list only /new-slug.
  2. 404 Not Found or 410 Gone URLs: Remove dead URLs and list only live, canonical URLs that return 200 OK. Error URLs waste crawl requests and can produce sitemap or indexing warnings in Search Console.
  3. noindex Pages: Never include a URL in sitemap.xml if it has <meta name="robots" content="noindex" />. Sending "please discover this URL" (sitemap) and "do not index this URL" (noindex) simultaneously creates a Search Console coverage conflict.
  4. URLs Blocked by robots.txt: Verify that no sitemap URL matches a Disallow: rule in your robots.txt (check with our robots.txt generator).
  5. Parameterized / Non-Canonical Duplicates: Exclude ?utm_source=, ?sort=, and ?page= variants unless they are intentionally self-canonicalized indexable pages. Confirm canonical alignment with our canonical URL generator.

Why Pages in Your Sitemap Still Show "Discovered – Currently Not Indexed"

Submitting a valid sitemap.xml ensures discovery, not indexation. When Google Search Console reports URLs as "Discovered – currently not indexed" or "Crawled – currently not indexed", it means Google knows the URL exists from your sitemap, but paused indexing for one of three reasons:

  1. Orphan URLs (Zero Internal Links): If a page appears in sitemap.xml but has zero internal <a href> links pointing to it from your homepage, category hubs, or blog posts, Google treats it as low-priority. Audit your page's outgoing links with our anchor text extractor.
  2. Thin or Boilerplate Content: A short page is not automatically a problem, but generic copy that adds little beyond other pages may not be selected for indexing. Give each tool or post a distinct purpose, specific instructions, examples, and genuinely useful supporting content.
  3. Fake <lastmod> Timestamps: If your build pipeline sets <lastmod> to today's date on every deploy even for pages that haven't changed in months, Google stops trusting your <lastmod> signal completely. Only emit or update <lastmod> when the page's visible content actually changes.

Step-by-Step Sitemap Deployment Checklist

  1. Generate your XML: Paste your canonical URLs into the free XML sitemap generator and download sitemap.xml.
  2. Host at the domain root: Upload the file to https://www.yourdomain.com/sitemap.xml and verify it returns HTTP 200 with Content-Type: application/xml.
  3. Declare in robots.txt: Add Sitemap: https://www.yourdomain.com/sitemap.xml at the bottom of your robots.txt file using the robots.txt generator (see our robots.txt beginner's guide).
  4. Submit in Google Search Console & Bing Webmaster Tools: Paste the sitemap path under Indexing → Sitemaps and monitor the Indexed vs. Not Indexed ratio every 14 days.