XML Sitemaps
An XML sitemap is a hint, not a command. Google says outright that submitting one is "merely a hint: it doesn't guarantee that Google will download the sitemap or use the sitemap for crawling URLs on the site". This lesson covers who needs one, what belongs in it, which tags Google reads and which it ignores, and how several sitemaps double as diagnostics.
It rests on the sitemaps overview and the requirements for building one.
Do you need one at all
Not always. The overview lists when a sitemap may be unnecessary: the site is "small" — about 500 pages or fewer, counting only pages you think need to be in search results; the site is comprehensively linked internally, so Googlebot can find all the important pages by following links from the home page; and you do not have many video, image or news pages that you want to show in search.
And the general sense: if your pages are properly linked, Google can usually discover most of your site; a sitemap can improve the crawling of larger or more complex sites or more specialized files, but it doesn't guarantee that every item in it will be crawled and indexed. How Google finds pages through links and how crawling differs from indexing is in the lesson on discovery and crawling.
What belongs in it
There is one rule: include the URLs you want to see in Google's search results. Everything else follows from it. Google generally shows canonical URLs in its results, which you can influence with sitemaps; the canonicalization guide calls a sitemap a weak signal that helps the URLs included in it become canonical.
| Include | Leave out, because they should not be in results |
|---|---|
| The canonical address of each page | Pages with noindex |
| Category, product and article pages | Addresses that answer with a redirect: redirect check |
| Language variants, if you put hreflang in the sitemap | Addresses returning 4xx and 5xx: organic 404s |
| Only what should genuinely be searchable | Tracking parameters, filters, sort orders, duplicates |
The file's state and its divergence from reality are tracked by sitemap monitoring, and what a link crawl actually reaches by the site crawler. Comparing the two pays off: an address that is in the sitemap but unreachable by links signals a structural problem.
Technical requirements
- Full addresses. Use fully-qualified, absolute URLs; Google will attempt to crawl them exactly as listed. A relative address such as /mypage.html will not do.
- Encoding. The file must be UTF-8 encoded.
- Location. You can host a sitemap anywhere on your site, but unless you submit it through Search Console it affects only descendants of its parent directory, which is why the root is recommended.
- Size. A single sitemap is limited to 50MB uncompressed or 50,000 URLs; beyond that it must be split, optionally with an index file.
Tags: what is read and what is ignored
Google ignores priority and changefreq values. It uses lastmod if it is consistently and verifiably accurate, for example by comparing it with the last modification of the page. And it should reflect the last significant update: a change to the main content, the structured data or the links is significant, an update to the copyright date is not. The practical consequence for seasonal pages is in the lesson on seasonality: a bumped date with no change does not make a page "fresh".
Several sitemaps are diagnostics
A useful detail: you can submit multiple sitemaps and sitemap index files, which is handy if you want to track the search performance of each individual sitemap in Search Console. The practical conclusion: split the sitemap by page type — articles, categories, products. Then the gap between submitted and indexed addresses shows per section, not as one blended figure. The status of each address is in the page indexing report, and the per-page breakdown in URL auditing.
How to submit one
Three ways, and they are equal: the Sitemaps report in Search Console (which shows when Googlebot accessed the file and any processing errors), the Search Console API, and a Sitemap line in robots.txt. A line such as Sitemap: https://example.com/my_sitemap.xml can go anywhere in the robots.txt file, and you can have several.
None of this is a condition for indexing. For a small, well-linked site you can skip the sitemap entirely.
Specialised extensions
| Type | What is documented |
|---|---|
| Images | Each url element can contain up to 1,000 image:image elements; the image URL may be on another domain if both are verified in Search Console |
| Video | Its own tags to describe a video: the file or player location, duration, publication date and others |
| News | Include only URLs for articles created in the last two days, then remove the URL or the news metadata; an empty sitemap in that period raises a warning but causes no problems |
| Language versions | hreflang can go in HTML, in HTTP headers or in the sitemap — the three are equivalent and there is no benefit in using all of them; in the sitemap each entry lists every variant, itself included |
How international markup performs is what international visibility helps check.
IndexNow: what can be stated
IndexNow is a separate protocol for notifying search engines about changed addresses, and it does not replace a sitemap. The list of endpoints on the protocol's own FAQ includes Amazon, Bing, Naver, Seznam.cz, Yandex and Yep; Google is not among them. For Google the sitemap and links still do the work, so IndexNow is an extra layer for other search engines, not a way to speed Google up.
Checklist
- Whether you need one: size, linking, media.
- Only addresses that should be in search results.
- Absolute URLs, UTF-8, the file at the root.
- lastmod accurate or absent; priority and changefreq not needed.
- Split by page type so each shows on its own.
- Submit through Search Console or a robots.txt line.
- Compare regularly against the site's real state.
Mistakes
- Putting everything in, noindex, redirects and errors included.
- Believing that being in the sitemap guarantees indexing.
- Filling in priority and changefreq: Google does not read them.
- Bumping lastmod with no significant change.
- One blended sitemap when you need the picture per section.
- Treating a sitemap as mandatory for a small, well-linked site.
What comes next
The next lesson is about search navigation and facets: how a catalogue turns into thousands of addresses and what to do with them.