Sitemaps

What a sitemap is, whether you need one, the types (XML, HTML, image, video, news), how to find, create, and submit one, and why sitemaps help discovery but never guarantee indexing.

First published: Jun 22, 2026 · Last updated: Jul 28, 2026 · Advanced
demand #2 in Discovery#2 in How Search Works#17 in Technical SEO#23 on the site
1 evidence signal on this page

A sitemap is a file that lists the URLs (and media) on your site so search engines can discover them. It helps discovery and is a great coverage/diagnostic tool — but submitting one never guarantees crawling or indexing. A single sitemap caps at 50,000 URLs or 50MB uncompressed; Google ignores <priority>/<changefreq> but reads an accurate <lastmod>. Automate it from the pages you actually have, list only canonical indexable URLs, and submit it in Search Console + Bing Webmaster Tools (the old ping endpoint is dead). This hub routes you to the deep dives: XML sitemap, sitemap index, image sitemap, and video sitemap.

TL;DR — A sitemap is a file listing your URLs (and optionally images/videos) so engines can discover them — a coverage and diagnostic tool, not a discovery silver bullet, because submitting never guarantees crawling or indexing. A single sitemap caps at 50,000 URLs or 50MB uncompressed (gzip is allowed; the cap is the uncompressed size); UTF-8; fully-qualified absolute URLs; entity-escape &, ', ", <, >. Google ignores <priority> and <changefreq> and only uses <lastmod> if it’s consistently accurate. Submit via Search Console, Bing Webmaster Tools, and the robots.txt Sitemap: line — the old ping endpoint has 404’d since Jan 2024, and IndexNow notifies Bing and others (not Google). Build it automatically, list only canonical indexable URLs, and use the submitted-vs-indexed signal in Search Console to find what’s missing.

What a sitemap is — and what it’s for

Google’s definition is the right anchor: “A sitemap is a file where you provide information about the pages, videos, and other files on your site, and the relationships between them.” Evidence for this claim A sitemap supplies search engines with information about pages, videos, and other files on a site and their relationships. Scope: Google's general definition of sitemaps; supported formats and extensions have additional requirements. Confidence: high · Verified: Google Search Central: Learn about sitemaps It’s an inventory you hand to search engines.

The most important framing I can give you: a sitemap is a coverage and diagnostic tool, not a discovery silver bullet. Google is explicit that “A sitemap helps search engines discover URLs on your site, but it doesn’t guarantee that all the items in your sitemap will be crawled and indexed.” Submitting a URL doesn’t index it. The real day-to-day payoff is the submitted-vs-indexed comparison in Search Console: split your sitemaps by section or content type and you can see which part of the site isn’t getting picked up. During a migration I’ll keep a sitemap of the old URLs around for a while on purpose, specifically so I can watch them drop out of the index in GSC.

Do you need one? Resolving the contradiction

You’ll see two pieces of advice that look like they conflict:

  • Google’s threshold: you likely don’t need a sitemap if the site is small (around 500 pages) and well internally linked; you likely do if it’s large, new with few backlinks, or media/News-heavy.
  • Mueller’s baseline: “Making a sitemap file automatically seems like a minimal baseline for any serious website, imo.”

Both are right, and here’s how I reconcile them: a sitemap isn’t strictly required for a tiny, well-linked site, but it’s cheap insurance and it’s now the expected baseline — so always generate one, automatically. Which brings me to the one rule I won’t bend on.

Automate it, or it rots

Sitemaps should be generated automatically from the pages you actually have. If someone hands me a manually-built sitemap, I already know it’ll fall out of date fast — somebody adds pages, nobody updates the file, and now it’s lying to Google. And there’s a subtler point: if you’re generating the sitemap from your real, crawlable pages anyway, search engines can usually reach those pages on their own through links. The sitemap earns its keep by being current and complete, not just by existing. Automation is what makes it current.

The types of sitemap

  • XML sitemap — the workhorse, written for crawlers. A list of <loc> URLs, optionally with <lastmod>. This is what people usually mean by “sitemap.”
  • HTML sitemap — a human-facing page of links. Useful for users and for internal linking, but it isn’t the file you submit to Search Console.
  • Image sitemap — surfaces images search engines might otherwise miss (for example, images loaded by JavaScript or served dynamically). Can be a standalone file or image tags added to an existing sitemap.
  • Video sitemap — gives search engines the metadata they need to understand and index your videos (thumbnail, title, description, and the media or player URL).
  • News sitemap — for sites in Google News, listing recent articles.

And XML isn’t the only accepted format. Google also takes RSS/Atom feeds and a plain-text .txt file (one URL per line). RSS and text formats can only list page URLs — no image or video metadata — so XML is the most versatile.

XML vs HTML

These get confused constantly, so keep them separate: an XML sitemap is for crawlers — machine-readable, submitted to Search Console, the thing search engines parse. An HTML sitemap is for people — a regular web page linking to your sections, which can also help internal linking. If you only build one, build the XML sitemap; that’s the one search engines actually use.

How to find a sitemap (and why some sites hide theirs)

To find a sitemap, try, in order:

  • /sitemap.xml — the default location on most platforms.
  • robots.txt — a public sitemap is usually named here with a Sitemap: line, which is also how engines auto-discover it.
  • site: operators / Search Console — for your own property, the Search Console Sitemaps report is the authoritative view of what’s submitted and how it’s doing.

But here’s the part most guides skip: not every sitemap is meant to be found. Some sites deliberately omit the Sitemap: line from robots.txt and submit the file only through Search Console and Bing Webmaster Tools. A sitemap referenced in robots.txt is readable by anyone — including competitors who’d love a tidy list of every URL you publish (unlinked pages, new launches, strategically important pages) and a way to watch how fast you ship. A sitemap submitted only through the consoles is effectively private. So if you can’t find a site’s sitemap at the usual paths, it may just be unlisted, not absent.

The trade-off is real, though: hiding the sitemap from robots.txt also means any engine that relies on robots.txt auto-discovery won’t see it unless you’ve submitted it in each console. If you go the private route, you have to do the submission legwork everywhere you care about.

How to create one

Almost every platform can generate a sitemap for you — and on most of them it’s automatic. I’ve put the per-platform paths (WordPress, Shopify, Wix, Squarespace, Webflow, Drupal, JS frameworks, and manual generators) in the Cheat Sheets tab so you can jump straight to yours. The short version for JS frameworks: search the framework name plus “sitemap” (for example, “Gatsby sitemap” or “Next.js sitemap”) — there’s almost always an existing module so you don’t hand-roll it. This site runs on Astro and uses @astrojs/sitemap, configured in astro.config.mjs.

How to submit it

The live methods:

  • Google Search Console — the Sitemaps report (and the Search Console API). The primary method.
  • Bing Webmaster Tools — submit there too; Bing fetches it immediately, then rechecks roughly daily.
  • robots.txt Sitemap: line — works for any engine that reads robots.txt, and is how a public sitemap gets auto-discovered. Use the full absolute URL.

What’s dead: the old standalone ping endpoint (google.com/ping?sitemap=). It’s been deprecated since 2023 and returns a 404 since January 2024 — Google killed it because the vast majority of submissions were spam. If you’ve got a plugin or cron job still hitting it, strip that out. For fast, URL-level notification of single changes to Bing and others, use IndexNow — but note Google does not participate in IndexNow, so it won’t speed up Google indexing. Bing’s own framing is that the two are complementary: sitemaps for comprehensive coverage, IndexNow for fast per-URL pushes.

Submission problems

When something goes wrong, the Search Console Sitemaps report will tell you — but the error labels aren’t always self-explanatory. I’ve put a full error → meaning → fix table in the Cheat Sheets tab. The greatest hits: “Couldn’t fetch” (wrong URL, robots block, or just not processed yet — often transient), “Unsupported format” (you submitted an HTML page instead of a real XML/RSS/Atom/txt file), and “URL not allowed” (the classic HTTP-vs-HTTPS / www mismatch, or URLs above the sitemap’s own path). A couple of non-error gotchas worth knowing: Google may serve you a stale cached copy, so changes aren’t instant, and submitting both the children and the sitemap index is harmless but unnecessary.

Best practices — and “exclude ≠ noindex”

The rules that matter, all from Google’s own spec:

  • Size: a single sitemap holds at most 50,000 URLs or 50MB uncompressed, whichever comes first. You can gzip it — the 50MB cap is the uncompressed size. Evidence for this claim Google limits a single sitemap to 50,000 URLs or 50 MB uncompressed. Scope: Google-supported sitemap files; larger inventories must be split across multiple sitemaps, optionally joined by an index. Confidence: high · Verified: Google Search Central: Build and submit a sitemap Over the limit, split into multiple sitemaps and tie them together with a sitemap index.
  • Encoding: UTF-8.
  • URLs: fully-qualified, absolute URLs. Entity-escape &, ', ", <, and >.
  • Tags Google ignores: <priority> and <changefreq> do nothing — don’t bother with them.
  • lastmod done honestly: Google only trusts lastmod if it’s consistently and verifiably accurate. Set it on significant updates (main content, structured data, or links) — not a blanket copyright-year or “today” stamp on every URL. Lie about it and Google stops believing the field. Done right, an accurate lastmod genuinely helps re-crawling (Bing leans on it even harder than Google does).
  • Contents: list only canonical, indexable, 200-status URLs. No redirects, no non-canonical URLs, no noindex’d pages. Any page you want indexed should be in the sitemap; nothing you don’t.

Worked audit: valid XML, polluted inventory

A sitemap can pass XML validation and still send contradictory discovery signals. This illustrative crawl joins each <loc> to its live response and index controls:

Sitemap URLObserved stateKeep?Action
https://shop.example/products/trail-runner200, canonical, indexableYesKeep
https://shop.example/products/old-trail-shoe301 to the current productNoReplace with the final URL
https://shop.example/account/login200 with noindexNoRemove from the sitemap
https://shop.example/sale/spring-2025Expired campaign returning 200Usually noRedirect, retire, or intentionally maintain
https://staging.shop.example/products/testPublic staging hostnameNoRemove and protect the environment

The sitemap file itself is well formed. The pollution appears only after comparing its inventory with status, canonical, robots, and lifecycle evidence. Fix the generator or source query rather than deleting the same rows by hand every release.

That last point hides the single most common conceptual error: exclude ≠ noindex. Leaving a URL out of your sitemap does not deindex it. The sitemap is an advertisement, not a gate — dropping a URL just stops you advertising it; it doesn’t remove it from Google. If you want a page gone, allow crawling and use noindex. The sitemap is the wrong tool for that job.

Where to go next

This page is the overview. Each of these is its own deep dive nested under the discovery topic:

  • XML sitemap — the format and anatomy: <urlset>, <loc>, <lastmod>, the ignored tags, what to include and exclude, and hreflang in sitemaps.
  • Sitemap index — the “sitemap of sitemaps” for large sites, when to split, and the math on how many URLs you can cover.
  • Image sitemap — surfacing images search engines might miss, the current (not deprecated) tag list, and cross-domain rules.
  • Video sitemap — the required tags, accepted file types, and getting videos understood and indexed.

Sitemaps are one half of discovery — the other half is crawling, which is how engines actually fetch the URLs your sitemap points to. For the whole picture, see How Search Works. Every topic above is in the sidebar too.

Add an expert note

Pin an expert quote

New person? Create their unclaimed profile at /admin/experts/ → Pin an expert quote first.