A sitemap is just a machine-readable list of URLs you want search engines to know about, written in XML. It does not “submit” your pages, it does not boost rankings, and Google ignores most of the metadata that fancy generators stuff into it. Here is what it actually does, what it ignores, and the minimal version that works in 2026.
TL;DR
Generate a /sitemap.xml that lists every public, indexable URL with an honest <lastmod> date. Skip <priority> and <changefreq> — Google has stated for years that it reads neither. Declare the sitemap in robots.txt so every crawler finds it, then submit it once in Google Search Console. Regenerate it on each deploy. That is the whole job.
What a sitemap is (and is not)
XML sitemaps were standardized in 2005, back when search engines could not reliably crawl JavaScript-heavy sites. In 2026 Google’s crawler is far more capable, but a sitemap is still the canonical way to say “here is the complete list of URLs I want indexed.” For a small site Google would find most of these URLs anyway by following internal links. The sitemap mostly speeds up discovery on launch day and surfaces URLs with weak internal linking.
Three things a sitemap does not do, despite common belief:
- It does not force indexing. Google still decides per-URL whether a page is worth indexing. A URL in your sitemap can sit “Discovered – currently not indexed” indefinitely if Google judges it thin or duplicate.
- It does not improve rankings. Discovery and ranking are separate stages. Once a URL is in the index, position depends on content, links, and intent matching.
- It does not replace internal links. A page reachable only through the sitemap and from nowhere else on your site sends Google a weak relevance signal.
Which fields Google actually reads
A <url> entry can carry four child elements. Only two matter, and only one of those is universally honored. This is the single most useful table to internalize.
| Field | Google behavior (June 2026) | What to do |
|---|---|---|
<loc> | Required. The absolute, canonical URL. | Always include; one host only. |
<lastmod> | Used as a crawl-scheduling signal if it looks honest. | Set to the real last-modified date in ISO 8601 (2026-05-15 or 2026-05-15T09:30:00+00:00). |
<changefreq> | Ignored. | Omit it. |
<priority> | Ignored. | Omit it. |
Google’s official position is blunt: it does not use changefreq or priority at all, and it treats priority as a subjective field that rarely reflects a page’s real importance. Padding every URL with <priority>1.0</priority> does nothing except bloat the file. The <lastmod> value is the one signal worth getting right, and only when it is verifiably accurate — Google cross-checks it against the page’s actual content, and a sitemap full of “today” on pages that never change gets the field discounted.
Build and submit, step by step
- Use your framework’s sitemap plugin rather than hand-writing XML. Astro:
@astrojs/sitemap. Next.js: the built-inapp/sitemap.ts. WordPress: Rank Math or Yoast. Hand-writing is fine for a five-page site and a waste of time for anything larger. - Confirm the output. Visit
https://yoursite.com/sitemap.xmlin a browser. You should see XML with a<urlset>root and a list of<url>entries. If you see your homepage HTML instead, the route is misconfigured. - Check each entry has
<loc>(the absolute URL) and an honest<lastmod>. Leave out<priority>and<changefreq>entirely. - Include only URLs you actually want indexed. Drafts, tag/paginated archives you do not want crawled, internal search-result URLs, and admin pages stay out. Mixing in
noindexor redirected URLs causes Search Console warnings. - Add a
Sitemap:line to yourrobots.txtpointing at the absolute sitemap URL (for example,Sitemap: https://yoursite.com/sitemap.xml). This is how Bing, Applebot, DuckDuckBot, and other crawlers discover it without any console submission. You can list multipleSitemap:lines. - Submit it once in Google Search Console under Sitemaps. There is no longer a way to “ping” Google to re-fetch — the old
pingendpoint was retired on June 26, 2023 and now returns a 404. Google re-fetches submitted sitemaps on its own schedule; you only resubmit if the sitemap’s URL changes. - Check Search Console Sitemaps a few days later. Status should read “Success” and “Discovered URLs” should match your real URL count. A successful fetch reporting “0 discovered” means the XML is malformed.
Common pitfalls
- Stuffing
<priority>and<changefreq>. Google reads neither. They add bytes and zero value. - Listing dead or redirected URLs. Any URL that returns 404, 301, or carries
noindexbecomes a Search Console warning. Keep the file to live, indexable, canonical URLs. - Letting
<lastmod>go stale. If you genuinely update an article, update its<lastmod>. Google uses an honest<lastmod>to prioritize re-crawling; a frozen date slows re-indexing of your edits. - Shipping the dev sitemap. A sitemap generated on the dev server lists
http://localhost:4321URLs. Always verify the production file at your real domain. - Listing both
www.and non-www.(orhttpandhttps) versions of a URL. Pick one canonical host; the others should be 301 redirects, not sitemap entries. - Blocking a sitemapped URL in robots.txt. Listing a URL in the sitemap while
Disallow-ing it in robots.txt is a self-contradiction that wastes crawl budget and can get the page dropped.
Who needs one — and who can skip it
Worth doing for any indie site with more than roughly 10 URLs, especially if some pages are not linked from the homepage, and required if you want a “submitted vs indexed” coverage breakdown in Search Console.
You can skip it for a single-page site or one where every URL sits in the main nav. The sitemap is still harmless to have, but Google finds five well-linked URLs without it just fine.
FAQ
- Does a sitemap improve rankings?: No. It improves discovery. Once a URL is discovered, ranking depends on content, links, and intent matching. A sitemap only shortens the time from “page exists” to “page is eligible for the index.”
- How big can a sitemap be?: Up to 50,000 URLs or 50MB uncompressed per file. Beyond that, split it and reference the parts from a sitemap index file (which can itself point to up to 50,000 sitemaps). Indie sites almost never hit either limit.
- Should I include images and videos?: For most content sites, no. Image and video sitemap extensions help image-heavy or video-first sites; a typical blog’s HTML page sitemap is enough, and Google still crawls images embedded in indexed pages.
- Do I still need to ping Google after publishing?: No. The sitemap ping endpoint was deprecated on June 26, 2023 and any request to it now 404s. Submit once in Search Console and/or declare it in robots.txt; Google re-fetches on its own.
- Why does Search Console say “Couldn’t fetch” for my sitemap?: Almost always one of: the URL is wrong, robots.txt blocks the sitemap path, the file returns 404, or the server returned a 500 during fetch. Open the URL in a private window — that reproduces exactly what Google sees.
For the authoritative spec, see Google’s Build and Submit a Sitemap and the original sitemaps.org protocol.
Related
- Submit a sitemap in Search Console
- robots.txt — what to put
- Astro sitemap setup
- Submit a new site to Google in 2026
Tags: #Indie dev #SEO #Technical SEO #Indexing #Getting started