A sitemap is just a list of URLs you want Google to know about, in XML. It does not “submit” your pages, it does not boost rankings, and Google ignores most of the metadata that fancy sitemap generators stuff into it. Here is what it actually does and the minimal version that works.
Background
XML sitemaps were invented when search engines could not reliably crawl JavaScript-heavy sites. In 2026 Google is much better at crawling, 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 these URLs anyway via internal links — the sitemap mostly speeds up the discovery on day one and helps surface URLs that have weak internal linking.
How to tell
- You are about to launch a site and want Google to discover URLs quickly.
- You have URLs that aren’t well linked from the rest of the site (orphan pages).
- You want a coverage report in Search Console showing “indexed vs submitted”.
- You read that you should set
<priority>and<changefreq>and wonder if they matter.
Quick verdict
Generate a /sitemap.xml that lists every public URL you want indexed, with <lastmod> reflecting the real last-modified date. Skip <priority> and <changefreq> — Google has confirmed it ignores both. Submit the sitemap in Search Console once. After that, regenerate it on each deploy.
Step by step
- Use your framework’s sitemap plugin. Astro:
@astrojs/sitemap. Next.js: built-inapp/sitemap.ts. WordPress: Rank Math or Yoast. Hand-writing XML is fine for tiny sites but unnecessary work otherwise. - Confirm the output. Visit
https://yoursite.com/sitemap.xmlin a browser. You should see XML with<urlset>and a list of<url>entries. If you see your homepage HTML instead, the route is broken. - Each
<url>should have<loc>(the absolute URL) and<lastmod>(ISO 8601 date, like2026-05-15). Skip<priority>and<changefreq>— Google has stated for years that it ignores them. - Include only URLs you actually want indexed. Drafts, paginated archives you do not want crawled, search-result URLs, admin pages — leave them out. Mixing in noindex URLs causes Search Console warnings.
- Submit in Search Console -> Sitemaps once. Re-submission is automatic — Google re-fetches periodically. You only need to submit again if you change the sitemap location.
- Check Search Console -> Sitemaps a few days later. Status should be “Success”, “Discovered URLs” should match your real URL count. If it shows “0 discovered” with a successful fetch, your XML is malformed.
Common pitfalls
- Padding the sitemap with
<priority>1.0</priority>on every URL. Google ignores it; it just makes the file bigger. - Including URLs that return 404, 301, or noindex. Each of those is a Search Console warning. Keep the sitemap clean of redirected and dead URLs.
- Forgetting to update
<lastmod>when you actually update an article. Google uses<lastmod>(when it is honest) to prioritize re-crawling — a stale date means slower re-indexing of edits. - Generating a sitemap on the development server with
http://localhost:4321URLs in it. Always check the production sitemap, not the dev one. - Listing both
www.and non-www.versions of the same URL. Pick one host and only list it. The other should be a 301 redirect.
Who this is for
Any indie site that has more than 10 URLs, especially if some are not linked from the homepage. Also required if you want a “submitted vs indexed” coverage breakdown in Search Console.
When to skip this
A single-page site or a site where every URL is in the main nav. The sitemap is still nice to have but does not change much — Google finds 5 URLs without a sitemap 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. Sitemaps just shorten the time from “page exists” to “page is in Google’s index”.
- How big can a sitemap be?: Up to 50,000 URLs or 50MB uncompressed per file. Past that, split into multiple sitemaps and reference them from a sitemap index. Indie sites almost never hit this limit.
- Should I include images and videos in my sitemap?: For most content sites, no. Image and video sitemap extensions are useful for image-heavy or video-first sites; for a typical blog, regular HTML page sitemap is enough. Google still crawls images embedded in indexed pages.
- Why does Search Console say “Couldn’t fetch” for my sitemap?: Almost always one of: (a) the URL is wrong, (b) robots.txt blocks the sitemap path, (c) the sitemap returns 404, or (d) the server returned 500 during fetch. Open the URL in a private browser — that reproduces what Google sees.
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