Free SEO audit for new clients — claim yours
Home/Learn SEO/Chapter 5: Technical SEO/XML Sitemaps: Helping Google Find Your Pages
Chapter 5 · Lesson 30 of 65

XML Sitemaps: Helping Google Find Your Pages

Learn how an XML sitemap helps Google discover your pages, what belongs in it, how big it can be, and how to submit and check it in Search Console.

By Rohit Choudhary · 8 min read · Updated October 2026

You publish a new page and wait. Days go by, and Google still hasn't noticed it. Someone tells you, "Just submit a sitemap." But what is a sitemap, exactly? Will it force Google to index your pages? And what are all those tags like lastmod and priority?

Let me clear it up. A sitemap is a helpful list, not a magic switch. Used well, it helps Google find your pages faster and gives you useful data in Search Console. After this lesson, you will know whether you need one, what to put in it, what to leave out, how big it can be, and how to submit and check it.

What is an XML sitemap?

An XML sitemap is a file that lists the URLs on your site that you want search engines to know about. Google's definition is a file where you give information about the pages, videos and other files on your site, and how they relate. It can also say when a page was last updated.

Think of it as the guest list you hand to the person at the door. The guest list doesn't decide who gets in, but it makes sure nobody important gets missed.

Normally, Google finds pages by following links, as I explain in how search engines work. A sitemap gives Google a second route to discover them. Here is an example of a very small sitemap for an invented plumbing business:

<?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-10-01</lastmod>
  </url>
  <url>
    <loc>https://www.example.com/services/drain-cleaning/</loc>
    <lastmod>2026-09-18</lastmod>
  </url>
</urlset>

Each <url> entry holds one page. <loc> is the page address, and <lastmod> is the date it last changed in a meaningful way. That's really all a basic sitemap needs.

XML is the most common format, but Google also accepts RSS or Atom feeds and plain text files with one URL per line. Google says it has no preference between formats. And don't confuse an XML sitemap with an HTML sitemap, which is a normal page of links for visitors; our article on whether you still need an HTML sitemap covers that.

Do I really need a sitemap?

Google is refreshingly honest about this. Its sitemap overview says you may need one if:

  • Your site is large, so it is harder to make sure every page is linked from somewhere.
  • Your site is new and has few links from other sites, so Google may not discover it quickly.
  • You have a lot of video, image or news content that you want to appear in Search.

And you may not need one if your site is small (Google says about 500 pages or fewer that you want in search results), it is well linked internally so Google can reach every important page from the home page, and you don't have much media you want in Search.

In practice, I suggest almost everyone has one anyway. Most website platforms create it for you at no cost, and it unlocks useful reporting in Search Console. Just don't expect it to fix a site with weak structure. Good site architecture and internal linking still matter most.

One more thing: Google says a sitemap doesn't guarantee that everything in it will be crawled and indexed. It is a hint, not an order.

What should go in a sitemap, and what should stay out?

A sitemap should list only the pages you actually want to appear in Google. A clean sitemap is a strong, clear signal. A messy one, full of redirects and duplicates, sends mixed messages and makes the Search Console reports harder to read.

IncludeLeave out
Pages you want in search resultsPages with a noindex tag
The canonical version of each page (the main version you want shown; see canonical tags)Duplicate versions, URLs with tracking or sort parameters
Pages that load normally (status 200)URLs that redirect or return errors (404, 410, 5xx)
Full, absolute URLs (with https:// and your domain)Relative paths like /about/
Pages crawlers are allowed to fetchURLs blocked in robots.txt
Important images and videos, if you use the extensionsLogin, cart, checkout and internal search pages

Google adds a few precise rules: the file must be UTF-8 encoded, URLs must be fully qualified, and Google crawls URLs exactly as you list them. So if your site uses https://www., every URL in the sitemap should too.

lastmod, priority and changefreq

Sitemaps can include three optional tags, and many people misunderstand them:

  • lastmod is useful, but only if it is honest. Google says it uses lastmod when it is consistently and verifiably accurate. It should reflect a significant change to the main content, structured data or links. Changing the copyright year in the footer doesn't count.
  • priority is ignored by Google.
  • changefreq is also ignored by Google.

So if a plugin stamps today's date on every URL every day, Google will likely learn to ignore your lastmod values. Accurate dates are the ones worth having.

How big can a sitemap be, and what is a sitemap index?

Google sets clear limits. A single sitemap can hold up to 50,000 URLs or 50MB uncompressed, whichever comes first. If you have more, you split them across several sitemaps.

To keep those organized, you use a sitemap index: a sitemap of sitemaps. It lists the addresses of your individual sitemap files, so you only need to submit one URL. Many platforms do this automatically, with separate sitemaps for pages, posts, products and so on. Here is an example:

<?xml version="1.0" encoding="UTF-8"?>
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
  <sitemap>
    <loc>https://www.example.com/sitemap-pages.xml</loc>
    <lastmod>2026-10-01</lastmod>
  </sitemap>
  <sitemap>
    <loc>https://www.example.com/sitemap-blog.xml</loc>
    <lastmod>2026-10-15</lastmod>
  </sitemap>
</sitemapindex>

The key limits and rules for sitemap index files, from Google's documentation and Search Console help:

  • One index file can list up to 50,000 sitemaps.
  • An index can list sitemaps only, not other index files.
  • The sitemaps it lists must be on the same site, in the same folder as the index or deeper (unless you set up cross-site submission).
  • You can submit up to 500 sitemap index files per site in Search Console.

Splitting by section has a nice side effect. In Search Console, you can see how many URLs from each sitemap are indexed, which makes it easier to spot a problem in, say, your product pages.

Google also supports special sitemap extensions for images, videos and news. News sitemaps have a lower limit of 1,000 URLs each.

How do I create and submit a sitemap?

Creating it

Google notes that many content management systems, such as WordPress, Wix and Blogger, make a sitemap automatically. SEO plugins and ecommerce platforms usually do too. Google suggests hand-making a sitemap only for very small sites with a few dozen URLs; larger sites should generate it automatically, so it stays up to date as pages are added and removed.

Submitting it

You can't upload a sitemap to Google; you publish it on your site and tell Google where it is. There are a few ways:

  • Search Console Sitemaps report: paste the sitemap URL and press Submit. This is the method I recommend, because it shows you status and errors.
  • A Sitemap: line in robots.txt: crawlers find it when they read the file. This works for all search engines that support it.
  • The Search Console API, for developers who manage many sites.

You might read older guides that mention "pinging" Google with your sitemap URL. Google announced in June 2023 that its sitemaps ping endpoint was going away, so don't rely on that method.

Reading the Sitemaps report

StatusWhat it meansWhat to do
SuccessGoogle fetched and read the sitemap without errorsNothing; check indexing over time
Has errorsGoogle read it but found problems; valid URLs are still usedOpen the details and fix the listed errors
Couldn't fetchGoogle couldn't get the file at allCheck the URL works, isn't blocked by robots.txt and returns status 200

The report also shows "discovered pages", the number of URLs Google found in the sitemap. Remember that discovered doesn't mean indexed. To see which pages actually made it into the index and why others didn't, use the Page indexing report, which I cover in getting pages indexed. Our guide to the Page indexing report explains every status.

Try it: find, check and submit your sitemap

  1. Find your sitemap. Look at yoursite.com/robots.txt for a Sitemap: line, or check your SEO plugin or platform settings. Common addresses include /sitemap.xml, /sitemap_index.xml and /wp-sitemap.xml.
  2. Open it in your browser. You should see a list of URLs or a list of sitemaps. Click into one of them.
  3. Spot-check ten URLs. Does each load normally, without redirecting? Is each a page you want in Google? Are any old, deleted, test or thank-you pages listed?
  4. Check the dates. If every lastmod shows today's date, your setup may be stamping dates automatically. Ask your developer or check plugin settings.
  5. Fix what you find. Usually that means setting unwanted page types to noindex or excluding them in your plugin, so they drop out of the sitemap.
  6. Submit it in Google Search Console under Sitemaps, if it isn't there already. Submit the index file if you have one.
  7. Add a Sitemap: line to robots.txt if one is missing.
  8. Come back in a week or two and compare discovered pages with indexed pages.

Questions beginners ask about XML sitemaps

Does submitting a sitemap get my pages indexed?

No. A sitemap helps Google discover your URLs, but Google says it doesn't guarantee that everything in it will be crawled and indexed. Pages still need to be useful, indexable and not duplicates.

Should I set priority and changefreq?

You can leave them out. Google says it ignores both priority and changefreq. Spend the effort on keeping lastmod accurate instead.

Where should my sitemap live, and what should it be called?

Any name works, and many platforms use names like sitemap.xml or sitemap_index.xml. Google recommends placing it at the root of your site, because a sitemap not submitted in Search Console only covers URLs in its own folder and below.

I removed a sitemap in Search Console. Will Google forget those pages?

No. Google says removing a sitemap from the report doesn't make it forget the sitemap or its URLs. To stop pages appearing, use noindex, remove the pages, or block crawling where that is appropriate.

Do I need separate sitemaps for images and videos?

Not necessarily. Google supports image, video and news extensions, and you can combine them in one sitemap. Images and videos on well-linked, indexed pages are often found without them, but they can help Google discover media it would otherwise miss.

Getting your sitemap right

An XML sitemap is a clean list of the pages you want Google to know about. Most sites get one automatically; your job is to keep it tidy. Include only canonical, indexable pages that load properly, keep lastmod honest, ignore priority and changefreq, split large sites with a sitemap index, and submit it in Search Console so you can watch for errors.

Next, in getting pages indexed (and keeping some out), you will learn what happens after Google discovers your URLs and how to fix pages that don't make it into the index. If you'd rather have someone check your sitemaps and indexing for you, our team can help; just request a quote.

Sources for this lesson on XML sitemaps

  1. Learn about sitemaps (Google Search Central)
  2. Build and submit a sitemap (Google Search Central)
  3. Manage your sitemaps with sitemap index files (Google Search Central)
  4. Manage sitemaps using the Sitemaps report (Search Console Help)
  5. Sitemaps ping endpoint is going away (Google Search Central Blog, June 2023)

Rather have experts handle your SEO?

Tell us about your website and goals, and we will send you a free, no-obligation custom plan.

CallFree Quote