By the PreIndex teamUpdated Based on Google Search Central documentation
In short
- A sitemap can list up to 50,000 URLs and be up to 50 MB uncompressed. Bigger sites use a sitemap index.
- One unescaped “&” or relative URL is enough for Google to reject the file or skip its URLs.
- Google ignores priority and changefreq. It uses lastmod only when the dates are consistently accurate.
- A valid sitemap helps Google discover pages. It doesn’t guarantee they get indexed.
The rules a sitemap must follow
Google reads sitemaps in the sitemaps.org XML format. The validator checks the rules that decide whether Google can use the file:
| Rule | Limit or format |
|---|---|
| URLs per sitemap | 50,000 at most |
| File size | 50 MB uncompressed at most |
| Sitemaps per index | 50,000 at most; an index can’t list other indexes |
| Root element | <urlset> or <sitemapindex> with the sitemaps.org namespace |
| Encoding | UTF-8, with & < > ' " escaped |
| URLs | Absolute, on the same host and protocol as you want indexed |
<lastmod> | W3C date, such as 2026-11-28 or 2026-11-28T10:30:00+00:00 |
| Response | HTTP 200, not blocked by robots.txt |
The most common sitemap errors
- An unescaped “&” in a URL. XML needs
&. One raw ampersand makes the whole file unreadable. - The sitemap URL returns an HTML page. Often a 404 page, a login page, or a redirect to the home page served with status 200.
- URLs on another domain or protocol. A sitemap on https://www.example.com listing http://example.com URLs usually means old URLs left over from a migration.
- Relative URLs.
/blog/postisn’t valid; every<loc>needs https:// and the domain. - Nested sitemap indexes. An index must list sitemaps of pages, not other indexes.
- Every lastmod set to today. Google stops trusting dates that change on every build, so the field becomes useless.
Search Console says “Couldn’t fetch”
This status means Google couldn’t download the sitemap. Check it in this order: the address answers 200 here; robots.txt doesn’t block it; there are no spaces or typos in the URL you submitted; and the server or firewall doesn’t block Googlebot.
If everything checks out, wait. Google has explained that the status can also appear when a server is overloaded or Google has used up the crawl capacity it set for the site, and it often clears on its own after a day or two. Resubmitting a valid sitemap again and again doesn’t speed it up.
Which URLs belong in a sitemap
A sitemap is a list of the pages you want in Google, so it should only contain canonical, indexable URLs that answer 200. Leave out:
- URLs that redirect, return 404 or 410, or are blocked by robots.txt;
- pages with noindex, or with a canonical pointing to another URL (check them with the Noindex Checker);
- duplicates created by tracking parameters, sorting or session IDs;
- internal search results and thin tag pages.
A clean sitemap sends a clear signal: when the URLs listed match the pages Google chooses to index, the file becomes a reliable source for finding new ones. To see which listed URLs are actually indexed, extract them with the Sitemap URL Extractor and run them through the Google Index Checker.
lastmod, priority and changefreq
Google ignores <priority> and <changefreq>. Leaving them out keeps the file smaller and changes nothing.
<lastmod> does matter: Google uses it to decide which pages to recrawl, but only if the dates are consistently and verifiably accurate. Update it when the main content changes, not when a sidebar, footer or copyright year does.
Getting Google to read your sitemap
There are two ways to tell Google where your sitemap is, and it’s worth doing both:
- Add a line to robots.txt:
Sitemap: https://example.com/sitemap.xml. Every major search engine reads it. - Submit it in Google Search Console under Indexing → Sitemaps, which also shows when Google last read it and how many URLs it found.
The old “ping” URL for sitemaps no longer works: Google retired it in 2023. For important new pages, PreIndex gets them crawled in minutes instead of waiting for the next sitemap read.
Frequently asked questions
How do I find the sitemap of a website?
Enter the domain above. We read robots.txt for Sitemap lines and try the common addresses such as /sitemap.xml, /sitemap_index.xml and /wp-sitemap.xml.
How many URLs can a sitemap have?
Up to 50,000 URLs and 50 MB uncompressed per file. Larger sites split their URLs across several sitemaps and list them in a sitemap index.
Does Google use priority and changefreq?
No. Google ignores both. It uses lastmod when the dates are consistently accurate.
Why does Search Console say my sitemap couldn’t be fetched?
Google couldn’t download it: a wrong address, a robots.txt block, a server error or a firewall. If the sitemap loads fine here, the status often clears by itself within a day or two.
My sitemap is valid. Why aren’t its pages indexed?
A sitemap only helps Google find pages. Each page still has to be crawlable, free of noindex and worth indexing. Check the URLs with the Google Index Checker to see which are missing and why.
Should I gzip my sitemap?
You can. Google reads .xml.gz files, and compression makes large sitemaps faster to download. The 50 MB limit applies to the uncompressed size.