An XML sitemap helps search engines find pages but does not guarantee indexing

An XML sitemap helps search engines find pages but does not guarantee indexing

A sitemap is a file that tells Google which pages your website has and which of them you consider important. Most content management systems generate it automatically.

That is exactly why hardly anyone checks it. Once pages that do not belong there get in, it starts to confuse rather than help.

This article explains what a sitemap is actually for, what should and should not be in it, and how to tell whether you have a problem.

What a sitemap is for and what it is not for

A sitemap is a list of URLs that helps a search engine find content faster. It is not an instruction, it is a hint.

It is essential to distinguish what a sitemap will do and what it will not. This is where most false expectations arise.

What a sitemap does and what it will not solve for you
A sitemap helps Google find pages. It does not guarantee that Google will index them.

What it does. It speeds up the discovery of new pages, helps with large websites and with pages that have few links pointing to them, and gives Google information about the last change.

What it does not do. It does not guarantee indexing. It does not improve rankings. It does not replace internal linking, which is a stronger signal for Google than a list of URLs.

In practice, this means a sitemap is hygiene, not a growth tool. When it is wrong, it does harm. When it is right, it simply stays out of the way. Even Google’s documentation states that it does not guarantee indexing.

In the wider context, it fits into what we describe under technical SEO, namely the crawling and indexing phase.

Patrik Pilous explains the basic concepts around sitemaps in the glossary entry sitemap.

What is an XML sitemap and how it works

An XML sitemap is a plain text file written in XML, a format that software can read easily. It follows a shared standard called the Sitemaps protocol, which Google, Bing and other services support. One file therefore works for all of them.

The file usually sits in the root of your domain, for example at example.com/sitemap.xml. When a crawler reads it, it gets a list of addresses, each with an optional date of the last change. The crawler then decides on its own which addresses to visit and when.

An XML sitemap is not the same as an HTML sitemap. The HTML version is an ordinary page with links meant for people. The XML version is meant for software, and your visitors never see it in the navigation.

XML sitemap example

A minimal sitemap with two pages looks like this, line by line:

  • <?xml version=”1.0″ encoding=”UTF-8″?>
  • <urlset xmlns=”http://www.sitemaps.org/schemas/sitemap/0.9″>
  • <url><loc>https://www.example.com/</loc><lastmod>2026-01-15</lastmod></url>
  • <url><loc>https://www.example.com/services/</loc></url>
  • </urlset>

The urlset element wraps everything and declares the standard. Each page has its own url element. Inside it, loc holds the full address, including https and the domain. The lastmod element is optional and uses the YYYY-MM-DD format. The file must be saved in UTF-8 encoding.

A sitemap index for split sitemaps looks similar. It uses sitemapindex and sitemap elements instead of urlset and url, and each loc points to one partial sitemap.

What should and should not be in a sitemap

The rule is simple. A sitemap should contain only the URLs you want to appear in search, and no others.

Breaking this rule is the most common mistake we see on Czech websites.

Which URLs belong in a sitemap and which do not
The most common mistake is a sitemap that contains URLs with noindex or redirects.

What belongs there: pages that return a 200 status code, have their own content, are not blocked and point to themselves as the main version.

What does not belong there: redirected URLs, pages marked noindex, pages blocked in robots.txt, pages canonicalised to another URL, filter result pages with no search demand, and technical URLs such as the basket or login.

A conflict between the sitemap and the rest of the website is a confusing signal for Google. If you tell it in the sitemap that a page is important, and on the page that it should not index it, you are contradicting yourself.

How to create an XML sitemap

In most cases you do not write the file yourself. You make sure your system generates it correctly.

  • Check whether you already have one. WordPress has a built-in sitemap at wp-sitemap.xml, and plugins such as Yoast or Rank Math replace it with their own. Shopify and most other platforms generate sitemap.xml automatically.
  • Generate it if your system cannot. Crawling tools can export a sitemap from the pages they find, or a developer can write a script. A file created this way has to be regenerated whenever the content changes.
  • Set what goes in. Exclude page types that should not be there, following the rules above.
  • Verify the result. Open the file in a browser and check that it loads without errors and returns a 200 status code.

Adding the sitemap to robots.txt

Add one line to your robots.txt file, for example Sitemap: https://www.example.com/sitemap.xml. Always use the full address. The line can go anywhere in the file and does not depend on user-agent groups. If you have several sitemaps or an index, you can list each on its own line.

Submitting the sitemap to Google

In Search Console, open the Sitemaps section, enter the address of your sitemap and click Submit. If you use an index, submitting the index is enough. You only need to do this once, because Google returns to the file on its own. The report then shows whether the file could be read and how many URLs were discovered.

How to tell whether you have a problem

The check takes ten minutes and you do not need a paid tool for it.

The process is the same for a small website and for an online shop with thousands of products.

How to check your sitemap in four steps
The ratio of submitted to indexed URLs in Search Console is the quickest diagnostic.

Open the sitemap in your browser, usually at a URL ending in sitemap.xml or sitemap_index.xml. Check how many URLs it contains.

Then open the Sitemaps section in Search Console and compare the number of submitted URLs with the number of indexed ones. A large gap is a warning sign.

Pick ten URLs from the sitemap at random and check them. Do they return 200? Are they not redirected? Do they not have noindex?

Finally, compare the number of URLs in the sitemap with the number of pages you actually want to be visible on the website. If the sitemap has twice as many, something in it does not belong there.

We describe how to find your way around Search Console in our article on Search Console. The Page indexing section fills in the rest of the picture.

Large websites and split sitemaps

A single sitemap can contain a maximum of 50,000 URLs. Larger websites therefore split it up and tie the parts together with an index.

However, splitting also has a practical benefit that is often overlooked.

If you split sitemaps by content type, with products, categories and articles each kept separate, Search Console will show you the indexing ratio for each group separately.

This is a diagnostic you cannot get any other way. If 90% of categories are indexed but only 30% of products, you know where to look for the problem.

For online shops, this split is the quickest way to find out that only a fraction of your product range is in the index.

Overrated data

Besides the URL, a sitemap can contain other information. Most of it has no effect today.

It is worth knowing which to bother with and which not.

Last modified date. The only data point that really matters, but only if it is accurate. If the date changes on every page every night, Google starts ignoring it.

Priority. According to Google’s own statements, it does not use it. There is no point setting it.

Change frequency. The same. A legacy field with no effect.

In practice, this means you should focus on which URLs are in the sitemap, not on their parameters.

What to avoid

We see the following mistakes again and again, and they all have the same consequence: Google stops trusting the sitemap.

They are fixed in the system settings, not by hand.

A sitemap that is not updated. A static file uploaded a year ago is worse than none at all.

URLs with noindex. You contradict yourself and Google chooses what to believe.

Blocking in robots.txt. A sitemap listed in a file that also blocks it. We see this more often than you would expect.

A sitemap not listed anywhere. It belongs in robots.txt and should be submitted in Search Console.

Common questions about sitemaps

The five questions we are asked most often by people who manage their own websites.

The answers apply in general; details vary by platform.

Do I need a sitemap at all

For a website with a few dozen pages and good internal linking, Google can manage without one. For online shops and larger websites, it is practically essential.

If your system generates it automatically, there is no reason to switch it off. Just check it.

How often should it be updated

Automatically, with every content change. Most systems can do this; nobody just bothers to verify it.

Uploading the file manually is now only done on static websites.

Should I include images in the sitemap

It makes sense for websites where images are a substantial part of the content, such as photographers, online shops with visual product ranges and the like.

For a typical company website, it is extra work with no measurable benefit.

Why Google does not index all URLs from the sitemap

Because a sitemap is not an instruction. Google chooses what is worth indexing based on the quality and usefulness of the content.

If the ratio is significantly low, the problem is not the sitemap but the content or the website structure.

Should I include filter pages in the sitemap

Only those with real search demand and their own content. Not the others.

For online shops, this decision matters more than the sitemap itself. It relates to what we describe under keyword cannibalisation.

Where to start

Open your sitemap in a browser and count how many URLs it contains. Then compare that number with how many pages you want to appear in search.

If the numbers differ significantly, pick ten random URLs and go through them. Within ten minutes you will know whether the problem lies in the sitemap or elsewhere.

If you cannot interpret the result, we can go through it together during SEO consulting. A low indexing ratio usually has a different cause than it first appears.

Want to review your whole website at once, including indexing and structure? We cover this as part of an SEO website audit. Get in touch via our Contact page.

Frequently asked questions about XML sitemaps

Where should an XML sitemap be placed?

The usual place is the root of your domain, for example example.com/sitemap.xml. Under the protocol, a sitemap can only list URLs in its own folder and below, so the root covers the whole website. Also list it in robots.txt so crawlers can find it.

Is there a size limit for an XML sitemap?

Yes. Besides the limit on the number of URLs, one file can be at most 50 MB uncompressed. You can compress it with gzip to save bandwidth, but the limit applies to the uncompressed size.

Do I need to resubmit my XML sitemap to Google after every change?

No. Once Google knows the sitemap, it rereads it regularly. You only need to submit it again if its address changes.

How do I find out whether a website has an XML sitemap?

Try opening /sitemap.xml or /sitemap_index.xml after the domain in your browser. You can also open /robots.txt and look for a line starting with Sitemap. If neither works, check the settings of your content management system.

Related Posts