Home⚙️
Blog / Crawling/Indexing
Crawling/Indexing

XML Sitemaps: How to Create One and Why Google Wants It

By Hanna Sanchez · October 1, 2026 · 3 min read
XML sitemaprobots.txtSearch Consolecrawling
Illustration of a tree diagram with connected page icons, representing an XML sitemap
Want to know how your site performs on this?Run a free audit with auditseo.tools in seconds.
Get your free audit →

Google discovers pages by following links, but on large sites, or ones with poorly linked pages, it can miss some along the way. An XML sitemap is an explicit list of every page you want crawled, presented to search engines in a format they can read instantly, without having to guess your site’s structure.

How it works

A sitemap is an XML file with one address per line, often reachable at yoursite.com/sitemap.xml. Each entry can also include the last modified date, so Google knows which pages to recheck more often. It doesn’t guarantee indexing, but it helps pages get discovered sooner, especially on new sites or ones with few external links pointing to them.

How to create one

  • With a plugin, on WordPress Yoast SEO and Rank Math generate and update it automatically with every new post, no manual work needed.
  • With an online generator Useful for static or custom-built sites, but it needs regenerating by hand every time the site’s structure changes.
  • Written by hand Only suitable for very small sites with few pages that rarely change.

What to include, and what to leave out

Include only the pages you actually want crawled and indexed: articles, products, main categories. Leave out noindex pages, admin areas, internal search results and duplicate content — including them wastes crawl budget for no benefit, and it’s one of the most common mistakes when launching a site.

How to submit it to Google

The most direct way is Search Console: open the Sitemaps section, paste the address and submit. You can also declare it in your robots.txt file, with a Sitemap: line that search engines read automatically, even without going through Search Console.

FAQ

Does a small site need a sitemap?

It isn’t essential, but it never hurts. If a site has very few pages, all well connected through internal links, Google can find them without any trouble anyway.

It becomes more useful as a site grows, or if some pages are isolated, reachable only through internal search or with few inbound links.

How many pages can a sitemap hold?

The technical limit is 50,000 addresses per file, or 50 MB uncompressed. Past that, you need to split it into multiple files linked by an index.

For most sites this limit is never a real issue: only large e-commerce stores or portals with tens of thousands of pages ever reach it.

Does a sitemap guarantee indexing?

No. It’s only a signal, not a command. Google can still choose not to index a page, for example if the content is too similar to another one already on the site.

A page in the sitemap does, however, have a better chance of being discovered quickly compared to one reachable only through deep internal links.

Do I need to update the sitemap every time I publish an article?

If you use a plugin like Yoast or Rank Math, it updates itself automatically. If you built it by hand or with a static generator, it needs to be regenerated and resubmitted.

With a site built on a modern static generator, the sitemap usually regenerates with every publish alongside the rest of the site, with no manual step needed.

Are XML sitemaps and HTML sitemaps the same thing?

No, they serve different purposes. The XML sitemap is built for search engines, not meant to be comfortably read by a person. The HTML sitemap is an actual page, meant for visitors, with links organized into categories.

You can have both without conflict: the XML one for Google, the HTML one as a navigation aid for people visiting the site.


This article is for informational purposes. SEO results depend on many factors and timelines vary by site.