XML Sitemap Best Practices for Faster Indexing

An XML sitemap is your list of pages that deserve to be indexed. Done well, it speeds up discovery and shows exactly which sections Google struggles with. Done badly, it is ignored.

A hand uses a wooden ruler on a world map, focusing on precise measuring.
Photo by MART PRODUCTION on Pexels

An XML sitemap is a file that lists the URLs of a website you want search engines to crawl and index, optionally with the date each page last changed. It does not guarantee indexing, but it helps Google and Bing discover new and updated pages faster — especially on new sites, large sites and pages with few internal links.

Key takeaways: list only canonical, indexable 200 URLs · keep lastmod accurate · max 50,000 URLs or 50 MB per file · split large sites with a sitemap index · submit in Search Console and reference it in robots.txt · validate with the Sitemap Checker.

What a sitemap looks like

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

Only <loc> is required. Google ignores <priority> and <changefreq>, and uses <lastmod> when it is consistently accurate.

What to include — and exclude

IncludeExclude
Canonical URLs that return 200Redirected URLs (3xx)
Pages you want in search results404, 410 and 5xx URLs
Important category, product, article and landing pagesnoindex pages
The final HTTPS host you useParameter, session and filter duplicates
Pages blocked by robots.txt

A sitemap full of redirects and errors teaches search engines that the file is unreliable. Clean it and it becomes a trusted signal.

XML Sitemap SEO Benefits and Best Practices — Darren Taylor · Watch on YouTube

Limits and sitemap index files

Each sitemap may contain up to 50,000 URLs and be up to 50 MB uncompressed (you may gzip it). Larger sites split URLs into several sitemaps and list them in a sitemap index:

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

Splitting by content type also makes Search Console's indexing report far more useful: you can see at a glance that, say, 98 % of posts but only 60 % of products are indexed.

lastmod done right

Update lastmod only when the main content changes meaningfully — not on every page view, comment or footer tweak. Sites that set every date to "today" train Google to ignore the field.

Image, video and news sitemaps

  • Image sitemaps help Google find images loaded by JavaScript.
  • Video sitemaps add title, thumbnail and duration for self-hosted video.
  • News sitemaps list articles from the last two days for Google News publishers.

Submitting your sitemap

  1. Add a line to robots.txt: Sitemap: https://example.com/sitemap.xml (build the file with the Robots.txt Generator).
  2. In Google Search Console open Sitemaps, enter the URL and submit. Do the same in Bing Webmaster Tools.
  3. Check the status after a few days: "Success" plus the number of discovered URLs.

Validating and auditing

  1. Run the sitemap through the XML Sitemap Checker to catch XML errors, size problems and mixed hosts.
  2. Copy its URL list into the HTTP Status Code Checker and remove anything that is not 200.
  3. Spot-check canonicals with the Canonical URL Checker — sitemap URLs should match their canonicals.
  4. Re-check monthly, and after every migration or CMS change.

Frequently asked questions

Do I need an XML sitemap?

Small, well-linked sites can be crawled without one, but a sitemap helps every site get new pages discovered faster and lets you monitor indexing in Search Console.

How many URLs can a sitemap contain?

Up to 50,000 URLs and 50 MB uncompressed per file. Use a sitemap index to combine several files.

Does Google use priority and changefreq?

No. Google ignores both and uses lastmod when the dates are accurate.

Should noindex pages be in my sitemap?

No. A sitemap should only list pages you want indexed.

How do I submit a sitemap to Google?

Open Google Search Console, go to Sitemaps, enter the sitemap URL and click Submit. Also reference it in robots.txt.

Shorten links & create QR codes free

Clean fvj.io links, dynamic QR codes and click analytics — plus 90 free SEO tools.

Keep reading