Technical SEO

XML Sitemap Best Practices: What to Include, What to Exclude, and How to Submit

By Reviewed by Hawrry Bhattarai
September 8, 2026 10 min read
Contents
TL;DR — the short answer

Build a high-quality XML sitemap that helps Google discover and index your best pages — covering lastmod, priority, changefreq, sitemap index, and image sitemaps.

12 min read · Technical SEO · Last updated July 2026

Quick answer: A good XML sitemap contains only canonical, indexable URLs with accurate lastmod dates. Exclude redirects, noindex pages, 404s, and parameter duplicates. Submit via Google Search Console and monitor coverage weekly.

Introduction

Most XML sitemaps are wrong. Not broken — they load fine and get submitted. But they’re filled with the wrong pages, wrong metadata, and contradictory signals that confuse rather than help Google.

A sitemap filled with redirected URLs, noindex pages, and thin content doesn’t accelerate indexing — it wastes Googlebot’s discovery requests on pages it will either ignore or penalize. A properly built sitemap, by contrast, is a direct signal to Google: “These are the pages that matter. Please crawl and index them.”

Getting your sitemap right is one of the fastest technical SEO wins available, particularly for sites with large catalogs or frequent content publication.

What you’ll learn:
– Which URLs to include and exclude from your sitemap
– How to use lastmod, priority, and changefreq correctly
– When to use sitemap index files
– How to submit your sitemap to GSC and monitor its health
– Image and video sitemap extensions


Table of Contents

  1. What XML Sitemaps Actually Do
  2. Sitemap File Structure and Syntax
  3. Include vs. Exclude: The Decision Framework
  4. lastmod: The Most Misused Sitemap Attribute
  5. Priority and Changefreq: What Google Actually Uses
  6. Sitemap Index Files for Large Sites
  7. Image and Video Sitemaps
  8. Submitting to Google Search Console
  9. Monitoring Sitemap Health

What XML Sitemaps Actually Do

A sitemap is a discovery mechanism, not an indexing guarantee. Submitting a URL to Google’s sitemap doesn’t mean Google will index it — Google still evaluates quality, canonicalization, and relevance before adding any page to its index.

What a sitemap does: it tells Google about URLs it might not find through link discovery. This is especially valuable for:

  • Large sites where Googlebot may not crawl deep enough to find all pages through links alone
  • New pages published before any internal or external links point to them
  • Orphan pages with no internal links
  • Content updated frequently where you want to signal freshness

For small sites (under 1,000 pages), a sitemap matters less because Google discovers pages through links. For large sites, it’s essential infrastructure.


Sitemap File Structure and Syntax

A basic XML sitemap:

<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
  <url>
    <loc>https://example.com/product/blue-running-shoes</loc>
    <lastmod>2026-07-01</lastmod>
    <changefreq>weekly</changefreq>
    <priority>0.8</priority>
  </url>
  <url>
    <loc>https://example.com/blog/training-tips</loc>
    <lastmod>2026-06-15</lastmod>
    <changefreq>monthly</changefreq>
    <priority>0.6</priority>
  </url>
</urlset>

Technical limits:
– Maximum 50,000 URLs per sitemap file
– Maximum 50MB uncompressed per file
– Use gzip compression for large files (reduces to ~10% of original size)
– Always use absolute URLs (https://example.com/path, not /path)
– Use your canonical domain (www or non-www — consistent with your canonical tags)


Sitemap Structure Visualizer

Interactive Sitemap Architecture Explorer



Small Site Architecture (under 1,000 URLs)
sitemap.xml
All pages in one file

→ /home, /about, /contact
→ /services/*, /blog/*
→ /products/* (if indexable)

Submit: one sitemap URL to GSC. Simple, fast, effective.


Include vs. Exclude: The Decision Framework

Include in your sitemap:
– All indexable pages that return a 200 status code
– Pages with self-referencing canonical tags pointing to themselves
– Pages with unique, valuable content
– Recently published pages without internal links yet
– Updated pages where you want Google to recrawl

Exclude from your sitemap:
– Pages with noindex meta tags (contradiction — don’t list pages you’ve told Google not to index)
– 301 redirect URLs (include the destination, not the source)
– 404 and 410 pages
– Parameter-generated URLs (?color=red&size=10)
– Paginated pages beyond page 1 (unless they have strong link equity)
– Thin content (tag archives, empty categories, auto-generated location pages)
– Duplicate pages without canonical tags pointing to preferred version
– Admin, login, cart, and checkout pages

The key rule: every URL in your sitemap should be the canonical version of the page, indexable, and returning a 200 status. Any URL that doesn’t meet all three criteria should be removed.


lastmod: The Most Misused Sitemap Attribute

lastmod tells Google when the page was last meaningfully updated. Google uses it to prioritize recrawling — pages with recent lastmod dates get recrawled sooner.

The problem: most CMS platforms auto-generate lastmod as the current date/time for every page, every time the sitemap is regenerated. This tells Google every page was updated today, which is false. Google detects this pattern quickly and stops trusting lastmod from your sitemap.

Use lastmod correctly:
– Only update it when the page content meaningfully changes (new section added, product price updated, article revised)
– Don’t update it when you fix a typo, update a footer, or change a template element
– Use W3C datetime format: 2026-07-10 (date only) or 2026-07-10T14:30:00+05:45 (full timestamp)
– For static pages that rarely change, a real date from last actual update is fine

In WordPress, the Yoast SEO plugin uses actual post modification date for lastmod, which is accurate. Screaming Frog’s sitemap generator also pulls real modification dates.


Priority and Changefreq: What Google Actually Uses

The honest answer: Google largely ignores priority and changefreq. Multiple Google employees have confirmed they pay minimal attention to these attributes. Google determines crawl priority through its own signals (PageRank, freshness signals, server response times).

That said, use them anyway for documentation purposes and to satisfy other search engines (Bing, Yandex, DuckDuckGo) that may use them:

Priority values:
1.0 — Homepage, key landing pages
0.8 — Category pages, product pages, service pages
0.6 — Blog posts, resource pages
0.4 — Secondary content, author pages
0.2 — Old archive pages, rarely-updated content

Changefreq values:
daily — News sites, product pages that update pricing daily
weekly — Blog posts, product catalog pages
monthly — Static service pages, about pages
yearly — Privacy policy, terms pages

Don’t set priority 1.0 for every page or changefreq always for everything. It makes the signals meaningless and tells sophisticated crawlers you haven’t configured your sitemap thoughtfully.


Sitemap Index Files for Large Sites

When you have more than 50,000 URLs or content spanning multiple categories, use a sitemap index file:

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

Submit the sitemap index URL to GSC. Each child sitemap appears separately in the Coverage report, letting you see indexation rates by content type — invaluable for diagnosing which sections have indexation problems.


Image and Video Sitemaps

Image sitemaps tell Google about images embedded in your pages that it might otherwise miss (particularly JavaScript-rendered images or images without descriptive file names).

<url>
  <loc>https://example.com/blog/running-gear-guide</loc>
  <image:image>
    <image:loc>https://example.com/images/running-shoes-2026.jpg</image:loc>
    <image:title>Best Running Shoes for Trail Running 2026</image:title>
    <image:caption>A selection of trail running shoes tested by our team</image:caption>
  </image:image>
</url>

Image sitemaps don’t replace good alt text and descriptive file names — they supplement them. Use them for e-commerce product images, real estate listing photos, and any site where image search traffic matters.

Video sitemaps follow a similar structure and help Google include your videos in video search results.


Sitemap Health Checker

Sitemap Health Checklist

Check each item for your current sitemap configuration:


Submitting to Google Search Console

  1. Go to Google Search Console → Sitemaps (under Index)
  2. Enter your sitemap URL (e.g., https://yourdomain.com/sitemap.xml)
  3. Click Submit
  4. Wait 24-48 hours for GSC to process it
  5. Check the Coverage report — it will show URLs discovered from sitemap and their indexation status

Monitor these metrics in GSC Sitemaps weekly:
Submitted URLs: Total count in your sitemap
Discovered URLs: How many GSC found when crawling your sitemap
Indexed URLs: How many are actually in Google’s index

A healthy site should have 70-90%+ indexation rate for submitted URLs. If you’re submitting 10,000 URLs and only 3,000 are indexed, you have a quality or crawl issue to diagnose.

Key takeaway: Your sitemap is a signal to Google, not a command. Fill it only with your best, canonical, 200-returning pages — and use lastmod accurately so Google trusts what you tell it.


Frequently Asked Questions

Q: How often should I regenerate my sitemap?
A: For sites publishing content frequently, daily regeneration is ideal. For static sites, regenerate whenever you publish new pages or retire old ones.

Q: Do I need a sitemap if I have a small site?
A: Not strictly, but it doesn’t hurt and takes minutes to set up. For small sites, the main benefit is signaling new content to Google faster than waiting for link discovery.

Q: My GSC shows many URLs as “Crawled – currently not indexed.” Is that a sitemap problem?
A: Usually not. “Crawled – currently not indexed” means Google reached the pages (good — your sitemap worked) but decided not to index them (content quality or duplication issue). Focus on improving the content quality of those pages.

Q: Should I include my blog pagination pages (/blog/page/2, /blog/page/3)?
A: Generally no. Paginated pages rarely need to be in your sitemap. Focus on individual post URLs. The exception is if your paginated pages have strong backlinks and you want to preserve that equity.

Q: How do I know if my sitemap is causing problems?
A: Check GSC Sitemaps tab for warnings or errors. Use Screaming Frog to crawl your sitemap and check for non-200 responses, redirect chains, and noindex pages listed in it.


Conclusion

Your XML sitemap is a direct communication channel with Google. Use it to clearly signal your most important, canonical, indexable pages — and nothing else. Keep it clean, keep lastmod accurate, and monitor indexation rates in GSC weekly.

The difference between a sitemap that helps Google and one that confuses it often comes down to 20 minutes of cleanup: removing redirects, noindex pages, and parameter URLs. That cleanup can meaningfully improve indexation rates within 4-6 weeks.


Let Ignited Nepal Handle This

Sitemap audits and rebuilds are a standard component of our technical SEO engagements. We’ve rebuilt sitemaps for enterprise e-commerce sites with 500,000+ products, resolving indexation rate drops from 45% to 88% in 8 weeks.

→ Request a Free Technical SEO Audit


Written by the Ignited Nepal SEO team. We build organic search systems for businesses across Nepal, Australia, UAE, USA, UK, and beyond. ignitednepal.com

NR

Article by

Niraj Raut

Head of Search at Ignited Nepal. Drove 340% organic traffic growth for EzyDog (Australia), 4× revenue for The Turf Man (Australia), and 120% month-on-month traffic growth for ThemeGrill (Nepal). Keynote speaker at WordCamp Nepal 2023 and verified WordPress.org open-source contributor.