Overview
A sitemap lists the canonical URLs you want crawled. One file works until the site passes 50,000 URLs or 50 MB uncompressed, or until news, image, and video entries need their own metadata. This page covers the index pattern, the <lastmod> rules, and the extension formats.
Split into a sitemap index past 50,000 URLs or 50 MB
Google limits a single sitemap to 50,000 URLs or 50 MB uncompressed, and gzip does not raise either limit. Past either, publish an index that references child sitemaps, and submit only the index in Search Console and Bing Webmaster Tools.
<?xml version="1.0" encoding="UTF-8"?>
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<sitemap>
<loc>https://example.com/sitemaps/pages-1.xml</loc>
<lastmod>2026-05-15T10:00:00-07:00</lastmod>
</sitemap>
<sitemap>
<loc>https://example.com/sitemaps/news.xml</loc>
<lastmod>2026-05-15T10:00:00-07:00</lastmod>
</sitemap>
</sitemapindex>- Use one child per format (
pages,news,images,videos). Search Console reports indexing per file, so format-specific drops are easy to find. - Use fully qualified absolute URLs, and list only canonical, indexable, HTTPS URLs.
- Reference the index from
robots.txtwithSitemap: https://example.com/sitemap-index.xml. - Gzip (
pages-1.xml.gz) only saves bandwidth.
Set <lastmod> from real content changes
Google uses <lastmod> only when it is consistently and verifiably accurate, and Bing’s July 2025 sitemap guidance calls it a key recrawl signal. Stamping the build time on every URL teaches both engines to ignore the field.
- Read it from the page’s
last_updatedfrontmatter or the file’s git history, never the deploy time. - Use ISO 8601 with a timezone, for example
2026-05-15T09:00:00-07:00. - Update it for changes to main content, structured data, or links, not for a changed copyright year.
- A page unchanged for two years keeps a two-year-old value.
Skip <priority> and <changefreq>
Google and Bing both ignore them. Leaving them in is harmless; tuning them is wasted effort.
Follow the news sitemap rules
Use a news sitemap to feed Google News with recent articles. Google News inclusion does not require one, but it keeps discovery fast.
- Include only articles from the last two days. Remove the URL or its
<news:news>block once it is older. - Limit each file to 1,000
<news:news>entries; split beyond that. An empty news sitemap is fine. - Required per entry:
news:publication(news:nameexactly as shown on news.google.com, plusnews:language),news:publication_date(W3C format), andnews:title(no author or publication name). - Regenerate on every publish and ping indexnow. See news-seo for markup and policies.
Follow the image sitemap rules
Nest image entries under the page that hosts them, with up to 1,000 <image:image> entries per <url>. Google reads only <image:loc>; it dropped caption, title, license, and geo_location support in 2022, so put captions in the page and licensing in IPTC metadata or structured data.
<url>
<loc>https://example.com/products/trail-runner-3</loc>
<image:image>
<image:loc>https://example.com/img/tr3-black.jpg</image:loc>
</image:image>
</url>The <loc> is the host page, not the image. Video entries follow video-seo.
Ping IndexNow on every change
indexnow pushes changed URLs to Bing and other participants; Google does not consume it. Bing’s guidance pairs it with sitemaps: IndexNow for deltas, the sitemap for the full inventory.
Avoid these sitemap errors
- Listing
noindex, redirected, or non-canonical URLs. The crawler fetches them and finds nothing rankable. - HTTP URLs on an HTTPS site. The crawler follows the 301 and wastes requests.
- A sitemap missing from
robots.txt. New sites get discovered later; submit it in Search Console as a stopgap.