What belongs in a sitemap
Only URLs you want indexed, and only in their canonical form. Including a URL that is blocked in robots.txt, canonicalised elsewhere, redirects, or returns a 404 sends a contradictory signal — a crawler is being told a page matters and then finding it should not be there.
The most common mistake is generating from a database of all pages rather than from the pages actually published.
The fields, honestly
| Field | Used by Google |
| --- | --- |
| loc | Yes — this is the whole point |
| lastmod | Yes, if it looks truthful |
| changefreq | Largely ignored |
| priority | Ignored |
Include lastmod when you actually track modification dates. Leave it out
rather than inventing one.
Escaping matters more than it looks
An unescaped & in a URL makes the XML invalid, and an invalid sitemap is
rejected in full rather than partially. Any URL with more than one query
parameter hits this. The tool escapes on the way out, which is the only reason
hand-written sitemaps break more often than generated ones.
Then tell someone about it
A sitemap nobody knows about does nothing. Add a Sitemap: line to your
robots.txt and submit it in Search Console — the robots.txt
generator writes that line.
Questions
Does a sitemap help ranking?+
No. It helps discovery. A sitemap tells a crawler which URLs exist, which matters for a large site, a new site with few inbound links, or pages buried deep in the navigation. It does not make any of them rank better.
Does priority do anything?+
Essentially nothing. Google has said for years that it ignores priority and largely ignores changefreq. They are part of the specification and harmless to include, but setting every page to 1.0 achieves exactly what setting none achieves.
Is lastmod worth setting?+
Yes, and it is the one optional field that is used — but only if it is honest. A sitemap where every page claims to have changed today is treated as noise, and crawlers stop trusting the field for the whole site.
What are the limits?+
50,000 URLs and 50 MB uncompressed per file. Past either, split into several sitemaps and list them in a sitemap index. The tool warns when your list is over the URL limit.