The marketing bible for getting noticed.

SEO

XML Sitemap: What It Is and How to Create and Submit One, With a Real Example

The tags Google reads and the ones it ignores, Search Console submission step by step and our own three-language sitemap.

An XML sitemap is the file that lists the URLs on your site you want to see in Google, along with when each one last changed. Your CMS almost always creates it for free, and you can submit it to Google in Search Console in about five minutes.

We tested this on our own sitemap: 243 URLs in three languages, checked one by one in late October 2026. Along the way we also asked ChatGPT, Perplexity and Gemini about sitemaps, and two of them still sold the tags Google ignores as useful.

Here's what goes in and what stays out, how to create and submit the file, and why a sitemap doesn't guarantee indexing. It's a basic piece of technical SEO.

On this page

What is a sitemap (and what an XML sitemap isn't)

An XML sitemap is a file listing the URLs you want Google to crawl and index, written in a format machines read.

The XML sitemap is a file, usually at yourdomain.com/sitemap.xml, that follows the sitemaps.org protocol and lists a site's important pages with optional data like the date each one last changed. It helps Google and Bing discover your URLs sooner, especially on new, large or poorly linked sites.

What it isn't: a map for people, an order Google has to follow, or a ranking factor. Google says plainly in its documentation that it doesn't guarantee everything you list will be crawled and indexed.

Do I need a sitemap for a small website?

Not strictly, if you have about 500 pages or fewer and they're all well linked, according to Google, though it adds that most sites benefit from one. Ours has 243 URLs and uses one anyway because the site is new: hardly anyone links to it yet.

XML sitemap example: the tags Google actually reads

A minimal XML sitemap has a urlset tag and, inside it, one url block with its loc for every page. The last-modified date is optional but useful.

If you came for an XML sitemap example to copy, this one works for a dental practice with two pages.

<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
  <url>
    <loc>https://smiledentalaustin.com/</loc>
    <lastmod>2026-10-20</lastmod>
  </url>
  <url>
    <loc>https://smiledentalaustin.com/teeth-whitening/</loc>
    <lastmod>2026-09-02</lastmod>
  </url>
</urlset>

Here's what Google does with each tag, per its guide to building and submitting a sitemap, updated in July 2026.

TagRequired?What Google does with it
urlsetYesOpens and closes the file
url and locYesReads the URL, which must be absolute (with https)
lastmodNoUses it only if it's consistently accurate
changefreqNoIgnores it
priorityNoIgnores it

The file must be UTF-8 with absolute URLs. And lastmod should only change when the content or links really change; updating the copyright year doesn't count.

How many URLs can an XML sitemap hold?

Up to 50,000 URLs or 50 MB uncompressed per file. If you go over, split it and group the files in an index, which can hold up to 50,000 sitemaps, per Search Console Help.

How to create a sitemap for free: CMS, generator or by hand

Learning how to create a sitemap for free usually means learning where your platform already put it: WordPress, Shopify, Wix and Astro all generate one on their own.

Your siteHow it's createdWhat to check
WordPressWordPress or your SEO plugin builds itNo tag archives, attachments or test pages
Shopify, Wix, SquarespaceAutomaticThat the primary domain is the right one
Astro, Next.js or another frameworkThe framework's plugin or fileThat lastmod isn't just the build date
Small site with no CMSAn online generator that crawls your pagesRegenerate it whenever pages change

Online generators work for a ten-page site, but the file goes stale as soon as you publish something new. The exact WordPress sitemap paths are in the FAQ below.

If you're still figuring out what is a CMS and which one to pick, one that builds and updates the sitemap on its own is a solid filter.

Which pages should go in your sitemap?

Only the ones you want in Google: canonical URLs that return a 200 status and carry no noindex tag. Leave out redirects, 404s, parameter versions, thank-you pages and anything you block in robots.txt. Listing them sends Google mixed signals.

XML sitemap generator: free tools, steps and limits

An XML sitemap generator crawls your site and hands you a file ready to upload. It suits small sites with no CMS or hand-built ones. XML-Sitemaps.com is the one people cite most: according to its own page, it's free, needs no registration and covers up to 500 pages.

Here's how to use it:

  1. Type your site's address and click the generate button.
  2. Wait for the crawl to finish: you'll see how many pages it added and how many it skipped.
  3. Download the file and upload it to the root of your domain.
  4. Submit it in Search Console and declare it in robots.txt, as the next section explains.

Three limits worth knowing:

  • Going past 500 pages takes the paid plan, which also adds automatic updates and image, video and news sitemaps.
  • The last-modified date comes from what your server reports. If every URL shows the same one, delete it: Google stops trusting the field.
  • It's a snapshot. Every time you publish, you'll have to repeat the process.

If your site runs on WordPress, Shopify or a framework, skip the generator: the sitemap already exists and updates itself.

How to submit sitemap to Google in Search Console, step by step

To submit a sitemap to Google you need a verified property in Search Console and the file's URL. The submission happens in the Sitemaps report.

  1. Find your sitemap URL

    Open it in your browser and make sure you see XML code, not an error page. Not sure how to find a sitemap? Check the Sitemap line in your robots.txt.

  2. Check that Google can read it

    Paste the URL into Search Console's URL Inspection tool and run the live test. The page fetch should come back as successful.

  3. Open the Sitemaps report

    In the menu, go to Indexing and then Sitemaps. You need owner permissions.

  4. Paste the URL and hit Submit

    Under "Add a new sitemap", type the path (for example, sitemap.xml) and click Submit. Google fetches it right away; crawling the URLs inside takes longer.

  5. Check the status

    "Success" means it was read without errors. "Has errors" means it was read but something's off. "Couldn't fetch" means Google couldn't download it at all. Click the row to see why.

  6. Declare the sitemap in robots.txt

    Add a line like Sitemap: https://yourdomain.com/sitemap.xml. That way Bing and other search engines find it too.

How often should you resubmit a sitemap?

You don't need to resubmit every time you publish: Google rereads it on its own schedule. Search Console Help suggests a new request only after significant changes or once you've fixed a fetch error.

Sitemap checker and validator: test yours and fix errors

A sitemap checker answers three different questions, so test them in order.

1. Is the XML well formed? A free validator catches unclosed tags and an unescaped &. The one at XML-Sitemaps.com checks the format of any sitemap URL you paste.

2. Can Google read it? The Sitemaps report in Search Console shows "Success", "Has errors" or "Couldn't fetch". When a fetch fails, the details page says "Sitemap could not be read". Google's help page lists the usual causes: robots.txt blocking the file, a wrong URL returning 404, temporary server problems, an unresolved manual action or low crawl demand. If it keeps failing, Google retries for a few days and then stops. Parsing errors usually mean an unescaped character, a wrong namespace or duplicate tags.

3. Do the numbers match? Compare "Discovered pages" with the URLs you meant to list. Say your file has 250 URLs and the report shows 243. Duplicates count once, so look for repeated addresses first.

Fixed something? Resubmit. If an error persists for several hours, the help page says that's the time to try again.

Sitemap index and hreflang: our three-language sitemap

A sitemap index is a file that groups several sitemaps. On a multilingual site, each URL can also declare its versions in other languages with hreflang.

Here's ours: robots.txt points to sitemap-index.xml, and that index points to one sitemap with every page. Each URL lists its Spanish, US English and Brazilian Portuguese versions, plus a default.

<url>
  <loc>https://notablia.com/en/seo/long-tail-keywords/</loc>
  <lastmod>2026-10-22</lastmod>
  <xhtml:link rel='alternate' hreflang='es' href='https://notablia.com/seo/long-tail-keywords/'/>
  <xhtml:link rel='alternate' hreflang='en-US' href='https://notablia.com/en/seo/long-tail-keywords/'/>
  <xhtml:link rel='alternate' hreflang='pt-BR' href='https://notablia.com/pt/seo/palavras-chave-de-cauda-longa/'/>
  <xhtml:link rel='alternate' hreflang='x-default' href='https://notablia.com/en/seo/long-tail-keywords/'/>
</url>

Google requires every url to list all of its versions, including itself, and treats hreflang in the HTML, in HTTP headers or in the sitemap as equivalent.

Sitemap SEO: why Google won't index every URL you submit

For sitemap SEO, a validator checks that the XML is well formed, but only Search Console tells you whether Google read it and which URLs made it into the index.

Open the Page indexing report in Search Console and filter by sitemap: you'll see how many submitted URLs are indexed and why the rest aren't.

If the sitemap is clean and pages are still missing, the problem lies elsewhere: content quality, internal links or duplicates. And anything that isn't indexed can't show up in Google Discover either.

Copy-paste prompts

Act as a technical SEO consultant. Here's the content of my XML sitemap: [paste it]. Tell me: 1) which URLs look duplicated, parameterized, test or thank-you pages; 2) whether the lastmod dates look real or all identical; 3) which sections are missing compared with this list of my site's sections: [paste it]. Return a table with the URL, the problem and the fix.

Frequently asked questions about XML sitemaps

How is an XML sitemap different from an HTML sitemap?

An XML sitemap is a file for search engines: a list of URLs with optional dates, which visitors never see. An HTML sitemap is a regular page full of links to every section, built for people who get lost in a large site. Google reads both, but only the XML version can be submitted in Search Console and report back how many URLs got indexed. Most small business sites need the XML file and can skip the HTML page if their menu is clear.

How do I find a website's sitemap?

Start with yourdomain.com/sitemap.xml, the most common location. If that fails, try sitemap_index.xml, used by Yoast and Rank Math, or wp-sitemap.xml, the default on WordPress without plugins. The shortcut that almost always works is opening yourdomain.com/robots.txt and looking for the Sitemap line, which usually holds the exact address. If the site is yours, the Sitemaps report in Search Console lists every sitemap you submitted and when Google last read it.

What is the best free XML sitemap generator?

The best one is usually the one already built into your platform, because it updates itself every time you publish. WordPress, Shopify, Wix and Squarespace all generate a sitemap automatically, and frameworks like Next.js or Astro have official options. Online generators that crawl your site work for a static site with a handful of pages, but the file goes stale the moment you add something. If you use one, regenerate and re-upload it after every change.

Is sitemap.xml still relevant?

Yes. Google still documents sitemaps as a way to help it discover pages, and it says most sites benefit from having one, even though small, well-linked sites can do without. What changed is the detail: Google now ignores the priority and changefreq tags, uses lastmod only when it's reliable, and no longer documents the old ping method. A clean sitemap also gives you Search Console data on how many submitted URLs make it into the index.

Where is the WordPress sitemap?

Since version 5.5, WordPress creates its own sitemap at yourdomain.com/wp-sitemap.xml. If you use Yoast SEO or Rank Math, the plugin replaces it with its own at yourdomain.com/sitemap_index.xml, which lets you exclude content types and specific pages. Keep just one of them, since two sitemaps with the same URLs add nothing. Before submitting, open it in your browser and make sure it doesn't include tag archives, attachment pages or test content.

What is an image sitemap?

An image sitemap is a regular XML sitemap with extra image tags inside each URL, telling Google where the images on that page live. It helps Google find images it might miss, such as ones loaded with JavaScript. Most sites don't need a separate file: Shopify, for example, already adds each product's main image to its product sitemap. It's worth setting up if image search brings you customers, like a photographer or a furniture store would.

Keep going with these guides