freeseobot

XML Sitemap Guide: What to Include and How to Submit

What an XML sitemap is, which URLs belong in it, the 50,000-URL limit, why Google ignores priority, and how to submit it to Google and Bing step by step.

By freeseobot Editorial · Published · 6 min read

An XML sitemap is a file that lists the URLs on your site you want search engines to find, with an optional date each one last changed. It should contain only live, indexable, canonical pages, use full URLs, and stay under 50,000 URLs or 50 MB per file. Submit it in Google Search Console and Bing Webmaster Tools, and list it in your robots.txt. Google calls a sitemap "merely a hint": it helps discovery, but it does not force anything to be crawled or indexed.

Do you need an XML sitemap?

Google's documentation says a sitemap is most useful when a site is large, new with few links pointing to it, or has a lot of video, image or news content. It also says you may not need one if your site is small, which it defines as "about 500 pages or fewer", and every important page is linked from your home page or menu.

In practice, almost every content management system creates one automatically, and it costs nothing to submit. The real question is not whether you have one, but whether it is accurate. A sitemap full of redirects, 404s and noindex pages sends mixed signals and wastes the time of anyone reading Search Console reports.

What a basic XML sitemap looks like

<?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/boiler-servicing</loc>
    <lastmod>2026-09-14</lastmod>
  </url>
</urlset>

Only <loc> is required. Two rules Google states: the file must be UTF-8 encoded, and URLs should be full, absolute URLs (https://www.example.com/page, not /page).

Which URLs belong in your sitemap?

Include Leave out
Pages you want in search results Pages with a noindex tag
The canonical version of each page Duplicates whose canonical points elsewhere
Live pages that return status 200 URLs that redirect or return 404
Product, service, location and article pages Cart, checkout, account and login pages
Category pages with real content Internal search results and filter combinations
The https and preferred www or non-www version Old http or alternate hostnames

A quick test: if you would not want a stranger to land on that URL from Google, it does not belong in the sitemap.

What Google does with lastmod, priority and changefreq

This is where many sitemaps carry useless data.

  • <priority> and <changefreq>: Google's sitemap documentation says plainly that "Google ignores <priority> and <changefreq> values." You can leave them out.
  • <lastmod>: Google uses it only if it is "consistently and verifiably" accurate. It should reflect the last significant change to the page: the main content, structured data or links. Updating a copyright year in the footer does not count.

When Google retired its sitemap "ping" endpoint in 2023, it pointed site owners to accurate lastmod values instead, saying it uses them as a signal for scheduling crawls of URLs it already knows. If your system sets every page's lastmod to today's date on every build, Google is likely to learn to ignore it.

Size limits and sitemap index files

Google's limit for a single sitemap is 50,000 URLs or 50 MB uncompressed, whichever comes first. Larger sites split their URLs across several sitemaps and list them in a sitemap index file:

<?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>
  </sitemap>
  <sitemap>
    <loc>https://www.example.com/sitemap-products.xml</loc>
  </sitemap>
</sitemapindex>

Submitting the index submits all of them. Splitting by page type (pages, products, blog posts) has a second benefit even on small sites: Search Console reports each sitemap separately, so you can see at a glance whether your products or your blog posts have indexing problems.

Where to find your sitemap on common platforms

Most platforms generate one for you:

  • WordPress: WordPress itself creates /wp-sitemap.xml. SEO plugins such as Yoast and Rank Math replace it with their own, usually at /sitemap_index.xml.
  • Shopify: /sitemap.xml, generated automatically.
  • Wix and Squarespace: /sitemap.xml, generated automatically.
  • Custom sites and frameworks: often /sitemap.xml, but check your build. In Next.js, for example, a sitemap.ts file generates it.

If your site has none, our free XML sitemap generator crawls your site and builds a sitemap of its indexable pages, ready to upload.

How to submit your sitemap

Google lists three ways. Use the first two.

  1. Search Console. Open Indexing > Sitemaps, enter the sitemap URL and click Submit. The status should change to "Success", with a count of discovered pages.
  2. robots.txt. Add a line anywhere in the file: Sitemap: https://www.example.com/sitemap.xml. Any search engine that reads robots.txt can then find it.
  3. The Search Console API, for sites that publish often and want to automate it.

The old method of "pinging" Google with a URL no longer works. Google announced its deprecation in June 2023, and requests to it now return an error.

Bing: submit the same sitemap in Bing Webmaster Tools, or import your site from Search Console. Bing also supports IndexNow, a protocol for telling search engines a URL has changed. The IndexNow site lists Bing, Yandex, Naver, Seznam.cz, Yep and Amazon as participants, and says a submission to one is shared with the others. Google is not listed.

How to check your sitemap is healthy

Once a month, open your sitemap report in Search Console and check:

  • Status is "Success". "Couldn't fetch" usually means the URL is wrong, blocked by robots.txt or returns an error.
  • Discovered pages roughly matches your real page count. A big gap means pages are missing or extras are included.
  • Indexing of sitemap URLs. Click the sitemap, then See page indexing, to see why submitted URLs are not indexed. Our guide on why a page isn't indexed explains each status.

Then spot-check the file itself. Open it in a browser and test a few URLs: each should load, return status 200 and not redirect. Our free SEO checker does this as part of a full scan: it flags sitemap URLs that return 404, noindex pages listed in the sitemap, and a sitemap missing from robots.txt.

Common sitemap mistakes

  • Listing redirected or deleted URLs. Usually left over after a redesign.
  • Including noindex pages. You are asking Google to index pages you told it not to index.
  • Mixing http and https, or www and non-www. List only the preferred version.
  • Blocking the sitemap in robots.txt. Google cannot read a file it is not allowed to fetch.
  • Fake lastmod dates that change on every page every day.
  • Expecting a sitemap to fix indexing. If Google crawls a page and chooses not to index it, the sitemap will not change that. Page quality and internal links will.

Questions

How often should I update my sitemap?

Every time you add, remove or significantly change a page. Most platforms do this automatically. If yours does not, regenerate it whenever you publish.

Do I need to resubmit my sitemap after every change?

No. Once Google knows where your sitemap is, it rereads it on its own schedule. Resubmitting is only useful if the sitemap URL changes.

Should I have an image or video sitemap?

Only if images or videos are central to your business and Google is not finding them through your pages. Google supports image, video and news extensions to the standard sitemap format.

Indirectly. Google's AI features draw on pages in its index, and a sitemap helps those pages get found. There is no separate sitemap format for AI search.

Sources

More guides