What is an XML sitemap and do you need one?

An XML sitemap is a file that lists the pages on your website you want search engines to find. It doesn't make pages rank by itself, but it helps Google discover new and changed pages faster, and it's one of the first things to fix on a new site.

Last updated · By the XKey team

Does a small website need an XML sitemap?

Google can find pages by following links, so a small, well-linked site will usually be found without one. A sitemap still helps: new pages get discovered sooner, Search Console reports which listed pages are indexed, and pages with few links pointing to them aren't missed. It costs nothing, so every site should have one.

What does an XML sitemap look like?

It's a plain list of page addresses, each with an optional date it last changed:

<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
  <url>
    <loc>https://www.example.co.uk/boiler-repairs</loc>
    <lastmod>2026-09-14</lastmod>
  </url>
</urlset>

Older sitemaps also include priority and changefreq. Google has said it ignores both, so don't spend time on them. The lastmod date is the one that matters, and only if it's accurate: Google learns to ignore dates on sites that change them every day.

Larger sites split pages into several sitemaps – for example pages, posts, products and categories – listed in a sitemap index. You submit just the index. Shops and media sites can also use image and video sitemaps, though most builders handle those for you.

Which pages belong in a sitemap?

  • Include every page you want in Google: home page, service and product pages, location pages, guides and blog posts.
  • Leave out pages set to noindex, redirected addresses, broken pages, duplicate versions (with tracking codes or filters) and private pages such as baskets and account areas.
  • Use the full, final address of each page – the same https and www (or non-www) version as your canonical tags.
  • Add accurate lastmod dates, changed only when the page really changes, so search engines know what to recrawl.

How do I create an XML sitemap?

  • WordPress: WordPress makes one at /wp-sitemap.xml; SEO plugins such as Yoast or Rank Math replace it with /sitemap_index.xml.
  • Wix, Squarespace and Shopify create one automatically at /sitemap.xml.
  • Hand-built sites: use our XML sitemap generator, then upload the file to your site's root folder.

How do I submit a sitemap to Google?

  1. Open Google Search Console and choose Sitemaps.
  2. Enter the sitemap address and press Submit.
  3. Add a line to your robots.txt file, such as Sitemap: https://www.example.co.uk/sitemap.xml, so every search engine can find it. See the robots.txt guide.
  4. Do the same in Bing Webmaster Tools – see Bing Places and Bing SEO.

What do sitemap messages in Search Console mean?

  • Couldn't fetch – Google couldn't download the file. Check the address opens in a browser, isn't blocked by robots.txt or a firewall, and that you submitted the exact address (with or without www).
  • Sitemap is HTML – the address shows a normal web page, often a "page not found" page. Find the real sitemap address for your platform from the list above.
  • URL blocked by robots.txt – the sitemap lists pages your robots.txt forbids. Remove one or the other.
  • Submitted URL marked noindex or has redirect – the sitemap lists pages that shouldn't be in it. Most plugins leave these out automatically, so this usually means an old or hand-made sitemap.
  • Discovered – currently not indexed – Google knows about the page but hasn't crawled it yet. Linking to it from important pages helps; see internal linking.

The free sitemap checker confirms your sitemap exists, is listed in robots.txt and includes the page you check.

Why are pages in my sitemap not indexed?

Being listed is an invitation, not a guarantee. Google may skip pages that are thin, too similar to others or poorly linked. Check the Pages report in Search Console for the reason, and read why isn't my website on Google?. Our free SEO check tests whether your sitemap exists, is declared in robots.txt and lists the page you checked.

Frequently asked questions

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

An XML sitemap is a file for search engines. An HTML sitemap is a normal web page listing your pages for visitors. Small sites don't need an HTML one if the menu is clear.

How many pages can one sitemap hold?

Up to 50,000 addresses or 50 MB. Larger sites split them into several files listed in a sitemap index.

Do I need to resubmit my sitemap after every change?

No. Once submitted, Google rechecks it regularly. Just keep it up to date, which builders and plugins do automatically.

Where is my sitemap?

Usually at /sitemap.xml, /sitemap_index.xml (Yoast and Rank Math) or /wp-sitemap.xml (WordPress without a plugin). Your robots.txt file often lists it on a Sitemap line.

Do priority and changefreq matter?

Not for Google, which ignores both. An accurate lastmod date is the only optional field worth keeping up to date.

Run a free SEO check now

About 50 checks covering Google, AI search, speed, security and local SEO. No sign-up.

Want the fixes done for you? XKey is made by IceWork, a web studio in Blackpool. IceWork builds fast, search-ready websites – a 3-page site including domain and a year's hosting is £350 all in.