XML Sitemap

DefinitionA file that lists the URLs of your website so search engines can discover, crawl and index them more efficiently, including when each page was last updated.

An XML sitemap is a machine-readable file that lists the URLs of a website you want search engines to crawl and index, usually with a last-modified date per URL. It is written in a fixed format: a urlset element containing one entry per page, each with a loc (the URL) and an optional lastmod. Most sites serve it at /sitemap.xml; larger sites split it across several files tied together by a sitemap index. The file helps search engines discover your pages faster, but it does not guarantee that any of them get indexed.

The misunderstanding I see most often is that a sitemap is treated as a ranking tool or as a switch that forces indexing. It is neither. Google treats the sitemap as a hint about which URLs exist and when they changed. If a page is thin, blocked or a duplicate, listing it changes nothing. Nor do the changefreq and priority fields matter; Google ignores both.

Why an XML sitemap matters for a webshop

A webshop produces more URLs than almost any other type of site: products, categories, brand pages, blog posts and often several language versions. New products are the clearest case. If a product page is only reachable three clicks deep in a category, Googlebot might take weeks to find it through links alone. A sitemap with an accurate lastmod tells Google the page exists today, which shortens the gap between going live and earning the first organic clicks.

The sitemap also protects crawl budget on bigger shops. A PrestaShop or WooCommerce store with layered navigation can generate tens of thousands of filter URLs. When the sitemap lists only the pages that deserve to rank, it acts as a clean inventory that helps Google spend its crawling on the right pages. Good crawlability starts with internal links; the sitemap confirms what you consider important.

How to check an XML sitemap

Start in Google Search Console. The Sitemaps report shows whether the file was fetched successfully, how many URLs it contains and when Google last read it. The Pages report is more revealing: filter on “Submitted and indexed” versus “Discovered, currently not indexed” and “Crawled, currently not indexed”. A large share of submitted URLs sitting in those last two groups means Google knows about the pages but does not consider them worth indexing, which is a quality or indexability problem rather than a sitemap problem.

Then I crawl the sitemap itself with Screaming Frog in list mode. Uploading the sitemap.xml as the URL list and crawling it shows which entries return a redirect, a 404, a noindex tag or a canonical pointing elsewhere. Comparing it with a normal site crawl exposes orphans: sitemap URLs no page links to. Ahrefs Site Audit flags the same issues. I also open the file in a browser to confirm the XML is valid, the URLs are absolute and use the preferred protocol and host, and the file stays under 50,000 URLs and 50 MB uncompressed.

Common XML sitemap mistakes

Listing URLs that should not be there. Only canonical, indexable URLs that return a 200 status belong in a sitemap. Redirects, 404 pages, noindexed pages, paginated filter URLs and the non-canonical side of a canonical tag all send Google mixed signals and waste crawl requests.

Fake or static lastmod dates. Google now uses lastmod to decide what to recrawl, but only when the dates are credible. A plugin that stamps every URL with today’s date on each generation, or a theme that updates lastmod when a sidebar widget changes, teaches Google to ignore the field for the whole site. If you cannot set it accurately, leave it out.

Discontinued products left in the sitemap. Shops that disable products without removing them from the sitemap keep inviting Google to crawl pages that now return a 404 or redirect. Make sitemap generation follow product status, and decide per product whether it should 404, 410 or redirect.

Never submitting or referencing it. There is no reason to wait for Google to find it by itself. Submit it in Search Console and add a Sitemap line to your robots.txt so every crawler finds it. For multilingual shops, also check that the hreflang annotations in the sitemap match the ones in the HTML, because conflicts cancel each other out.

How I handle XML sitemaps for clients

On WooCommerce I configure the sitemap through RankMath or Yoast and exclude the post types and taxonomies that should not rank: tags, attachment pages, empty attribute archives. On PrestaShop I use the sitemap module and check that disabled and out-of-catalogue products drop out automatically. Shopify generates its sitemap index itself, so the work there is making sure products, collections and blogs are not hidden from search unintentionally. I add image sitemaps where product photography matters, and video sitemaps only when a shop hosts video pages.

The deliverable is a sitemap audit sheet: every submitted URL with its status code, indexability, canonical and index state from Search Console, plus the list of orphan pages. From that sheet the developer gets a short fix list, and I monitor the Pages report in the following weeks to confirm indexed counts move. It is one component of a broader technical SEO engagement; the sitemap rarely fixes rankings on its own, but it is the fastest way to see how Google perceives the shape of a shop.

Frequently asked questions

Does a small webshop need an XML sitemap?

A shop with a few hundred well-linked pages will get crawled without one, but a sitemap costs nothing and gives you the Sitemaps report in Search Console as a monitoring tool. I set one up for every client regardless of size.

How many URLs can one sitemap contain?

The limit is 50,000 URLs and 50 MB uncompressed per file. Beyond that you split the URLs across several files and list those in a sitemap index. Most plugins and platforms do this automatically, usually split by content type.

Should filter and sort URLs be in the sitemap?

Not unless a specific filter page is deliberately optimised as a landing page with its own canonical URL. Parameter URLs such as ?orderby=price should stay out. Including them bloats the file and tells Google you consider near-duplicates important.

Why are my submitted URLs not indexed?

Submission is a request, not a command. If Search Console shows submitted pages as “Discovered, currently not indexed”, Google has chosen not to crawl or index them yet, usually because of thin content, duplication or weak internal links. Fix the page quality and linking first; the sitemap only makes sure Google knows the page exists.

← Back to the glossary

Scroll to Top