Skip to content

What is a sitemap, what is it for, and how to create an XML sitemap

By the SEOXtreme editorial teamUpdated 6 min read

You uploaded a new collection weeks ago and Google still doesn't show many of those products. You check Search Console and they appear as discovered but not indexed, or they don't appear at all. Before blaming the algorithm, there's a basic question worth answering: what is a sitemap, does your store have one, and is it telling Google the right thing?

A sitemap isn't magic, but it's the most direct way to hand Google the list of pages that matter. In this guide you'll see what it's for, what a store's sitemap should include (and exclude), its limits, how to add your product images, and how to submit it to Search Console step by step.

In short:

  • An XML sitemap is a file that lists the URLs you want search engines to find, with data such as the last modified date.
  • It helps discover pages, but it doesn't guarantee they'll be crawled or indexed.
  • In a store it should include only canonical, indexable URLs: products, categories, brands, blog, and key pages.
  • Each file supports up to 50,000 URLs or 50 MB uncompressed; if you go over, use a sitemap index.
  • Submit it in Search Console and declare it in your robots.txt.

What is a sitemap in SEO, and what is it for

Google defines it in its guide Learn about sitemaps as a file where you provide information about the pages, videos, and other files on your site, and the relationships between them. Search engines read it to crawl more efficiently, learn when a page changed, and discover its versions in other languages.

In SEO terms: the sitemap is a discovery tool. It doesn't replace internal linking or improve a page's quality on its own, but it reduces the dependence on Google finding your important URLs only by following links.

Google accepts sitemaps in XML, RSS or Atom, and plain text. XML is the most versatile format because it supports extensions for images, video, and news.

Does your store need an XML sitemap?

According to Google, you probably need one if your site is large, if it's new and has few external links, or if it has lots of images, videos, or news. You may not need one if it's small (about 500 pages or fewer, counting only those that should appear in results) and everything is linked from the home page.

An online store usually falls into the first group: the catalog grows, products get buried in pagination or behind filters, and images matter. Google also acknowledges that most sites benefit from having one. The practical recommendation: always have one and let it update itself.

XML sitemap example: the anatomy of the file

This is a minimal sitemap with one product and one category:

<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
  <url>
    <loc>https://www.example.com/product/waterproof-urban-backpack-25l/</loc>
    <lastmod>2026-11-02</lastmod>
  </url>
  <url>
    <loc>https://www.example.com/category/backpacks/</loc>
    <lastmod>2026-10-28</lastmod>
  </url>
</urlset>

The tags you'll see and what Google does with them, according to its guide to building and submitting a sitemap:

Tag What it indicates What Google does
loc The full, absolute URL Crawls it exactly as written
lastmod Date of the last relevant change Uses it only if it's consistently and verifiably accurate
changefreq Estimated change frequency Ignores it
priority Relative priority Ignores it

The file must be UTF-8 encoded and use absolute URLs (with https and the same domain your store uses).

What a store's sitemap should include (and exclude)

The golden rule: only URLs you want to see on Google and that return indexable content.

Include Exclude
Canonical product pages Cart, checkout, and "My account"
Categories and subcategories Site search results
Brand pages URLs with filter or sorting parameters
Blog posts and guides Pages with noindex
Key pages: shipping, returns, contact URLs that redirect or return 404
Landing pages with their own content Variants whose canonical points to another URL

If a variant or a filtered URL points its canonical to another page, the one that goes in the sitemap is the canonical; we explain it in the guide to the canonical tag. And if a product is out of stock for good, redirect it or remove it from the sitemap instead of leaving an empty page.

Sitemap limits and the sitemap index

Google sets two limits per file: 50,000 URLs or 50 MB uncompressed. If your catalog exceeds them, split the sitemap and group it with an index. Even if you don't reach the limit, separating by type (products, categories, blog) helps you see in Search Console which part of the site has problems.

A sitemap index looks like this:

<?xml version="1.0" encoding="UTF-8"?>
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
  <sitemap>
    <loc>https://www.example.com/sitemap-products-1.xml</loc>
    <lastmod>2026-11-02</lastmod>
  </sitemap>
  <sitemap>
    <loc>https://www.example.com/sitemap-categories.xml</loc>
    <lastmod>2026-10-28</lastmod>
  </sitemap>
</sitemapindex>

According to the Sitemaps report help, an index can list up to 50,000 sitemaps, and only sitemaps: it can't contain other indexes.

An image sitemap for your product pages

In a store, photos bring traffic too. The guide to image sitemaps lets you add up to 1,000 images per URL with Google's image extension:

<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
        xmlns:image="http://www.google.com/schemas/sitemap-image/1.1">
  <url>
    <loc>https://www.example.com/product/waterproof-urban-backpack-25l/</loc>
    <image:image>
      <image:loc>https://cdn.example.com/img/backpack-25l-front.jpg</image:loc>
    </image:image>
    <image:image>
      <image:loc>https://cdn.example.com/img/backpack-25l-side.jpg</image:loc>
    </image:image>
  </url>
</urlset>

Three useful details: images can live on another domain, such as a CDN, as long as you verify both domains in Search Console; Google removed the image title, caption, geo location, and license tags from its documentation, so image:loc is enough; and the sitemap doesn't replace good image alt text, which is still what describes the photo.

How to create the sitemap in WordPress and WooCommerce

WordPress generates a basic sitemap index at /wp-sitemap.xml, which includes your posts, pages, products, and public taxonomies. A detail many people miss: if you checked the option in the reading settings to discourage search engines from indexing the site, WordPress disables that sitemap.

Many SEO plugins work as an XML sitemap generator with their own path. That's fine, as long as only one is active and that's the one you submit to Google. Open the sitemap in your browser and check that your products and categories are there, and that no cart, account, or filter URLs appear.

SEOXtreme generates XML sitemaps that include articles, landing pages, images, video, and news, and notifies Bing and other compatible search engines of your changes through IndexNow (Google doesn't use IndexNow; for Google, the sitemap and Search Console are what count). See how it works in WooCommerce SEO.

How to submit your sitemap to Google Search Console

  1. Publish the sitemap (the root of the domain is recommended) and confirm with a live test in URL Inspection that Googlebot can fetch it.
  2. Open the Sitemaps report in Google Search Console, type the URL in the field to add a new sitemap, and submit it. You need owner permissions; if you don't have them, declare it in your robots.txt.
  3. Check the status: success, has errors (valid URLs are still queued), or couldn't fetch.
  4. Declare the sitemap in your robots.txt so any search engine can find it:
Sitemap: https://www.example.com/wp-sitemap.xml

Google downloads the sitemap right away, but crawling the URLs it contains takes time. If you need a specific page reviewed sooner, use URL Inspection to request indexing. Two more notes: removing a sitemap from the report doesn't make Google forget its URLs, and the report doesn't show data for image, video, or news URLs. Google also retired the old sitemap "ping" a while ago: submitting in Search Console and the line in robots.txt are the way. For the rest of that file's rules, see our guide to robots.txt.

Common XML sitemap mistakes

  • URLs with noindex, redirects, or 404 errors inside the sitemap: you send Google contradictory signals.
  • Mixed URL versions: http and https, with and without www.
  • A fake lastmod: every URL with today's date on every visit. Google stops trusting that data.
  • Two competing sitemaps, WordPress's and a plugin's, with different contents.
  • A blocked sitemap behind robots.txt, a firewall, or a login.
  • Expecting IndexNow to speed up Google: it works for Bing and other search engines; we explain it in the guide to IndexNow.
  • Asking the sitemap for what it can't give: if a page has duplicate or thin content, it won't be indexed just because it's on the list. Review the causes in Google not indexing my site.

Conclusion: a short, clean list beats a long one

Now you know what a sitemap is and what it's for: a list of the URLs you really want on Google, updated automatically and free of junk. Check what yours includes, remove what shouldn't be there, add your product images, and submit it to Search Console.

Do this review today: open your store's sitemap, look for five URLs that shouldn't be there (cart, filters, redirected pages), and fix it from your plugin. To continue with the technical side, explore our Technical SEO guides.

Frequently asked questions

What is a sitemap and what is it for?

A sitemap is a file that lists the pages, images, videos, and other files on your site that you want search engines to find, along with data such as the last modified date. It helps Google and other search engines discover and crawl your URLs more efficiently, especially those that are poorly linked or new. It doesn't guarantee indexing, but it makes discovery easier.

What's the difference between an XML sitemap and an HTML sitemap?

The XML sitemap is a file meant for search engines: visitors don't see it, and it's submitted in tools like Search Console. The HTML sitemap is a normal page with organized links so people can find sections of the site. In a store, the XML one is what matters for technical SEO; the HTML one is optional and depends on how easy it is to navigate your catalog.

Does my store need a sitemap if it has few pages?

Google explains that a small site, of about 500 pages or fewer counting only those that should appear in results, and well linked from the home page, may not need one. Even so, it acknowledges that most sites benefit from having one. In a store, where the catalog grows and changes, the recommendation is to always have one and let it update itself.

Does submitting the sitemap guarantee Google will index my products?

No. Google describes a submitted sitemap as just a hint: it may download it and use it for crawling, but it doesn't promise to crawl or index every URL. If your products aren't being indexed, check content quality, duplicates, noindex tags, canonicals, and internal linking. The sitemap helps Google find the pages; whether it indexes them depends on other signals.

Where do I find my store's sitemap in WordPress?

WordPress publishes a basic sitemap index at the /wp-sitemap.xml path on your domain. If you use an SEO plugin, it may generate its own sitemap at a different path and disable WordPress's; check its settings or your robots.txt file to see which one is active. Submit to Search Console only the index from the system you actually use.

How often should I update the sitemap?

Every time something important changes, and ideally it happens automatically: when you publish, edit, or remove a product, the sitemap should reflect it. The last modified date should change only when there are relevant changes to content, structured data, or links. Google uses that date only if it's consistent and verifiable, so don't update it artificially.

Sources

  1. Learn about sitemaps (Google Search Central)
  2. Build and submit a sitemap (Google Search Central)
  3. Image sitemaps (Google Search Central)
  4. Manage your sitemaps using the Sitemaps report (Search Console Help)

Written and reviewed by the SEOXtreme editorial team using official sources (Google Search Central, platform documentation, and published studies). If you spot outdated information, email us at hola@vidaxtreme.com.

Keep learning

Stop optimizing by hand

SEOXtreme does this work for you across your whole catalog, with your approval. Try it for 14 days, no credit card.

14-day free trialAudit