What is an XML sitemap?
A file that lists the pages on your site you want search engines to find, with optional dates for when each one last changed. It helps them discover pages; it does not make them rank.
Last updated
What is an XML sitemap used for?
An XML sitemap is a list of the URLs on your site that you want search engines to crawl and index. It usually lives at https://yourdomain.com/sitemap.xml. Crawlers mostly find pages by following links; a sitemap gives them the full list directly, which matters when pages are new, deep in the site, or poorly linked. The format is defined by the sitemaps.org protocol, which Google, Bing and other engines follow.
sitemap.xml
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>https://example.com/</loc>
<lastmod>2026-10-12</lastmod>
</url>
<url>
<loc>https://example.com/guides/stoneware-care</loc>
<lastmod>2026-09-30</lastmod>
</url>
</urlset>
Each <url> holds one page: <loc> is its full address and the only required tag, and <lastmod> says when it last changed in a meaningful way. Two more tags exist, <priority> and <changefreq>, but Google and Bing ignore both; see lastmod, priority and changefreq.
What should go in a sitemap?
Your canonical pages, the versions you want to appear in search. Leave out pages that are noindex, blocked by robots.txt, redirects, duplicates whose canonical points elsewhere, and error pages. A sitemap full of URLs a search engine will discard makes the useful ones harder to trust.
What are the limits?
| Limit | Value |
|---|---|
| URLs per sitemap | 50,000 |
| Size per sitemap | 50 MB (52,428,800 bytes), uncompressed |
| URL length | Shorter than 2,048 characters |
| Encoding | UTF-8, with & written as & |
| Sitemaps per sitemap index | 50,000 |
| Sitemap index files per site in Search Console | 500 |
The first five come from the protocol and Google’s own guide, which says “All formats limit a single sitemap to 50MB (uncompressed) or 50,000 URLs” (Google’s guide to building a sitemap); the last from Google’s guide to large sitemaps. You may compress a sitemap with gzip; the limits apply to the uncompressed size.
What is a sitemap index?
A file that lists other sitemaps, for sites too big for one. It uses <sitemapindex> and <sitemap> entries, each with a <loc> pointing to a sitemap file. Submit the index, and search engines read the sitemaps it lists.
sitemap-index.xml
<?xml version="1.0" encoding="UTF-8"?>
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<sitemap>
<loc>https://example.com/sitemap-pages.xml</loc>
</sitemap>
<sitemap>
<loc>https://example.com/sitemap-posts.xml</loc>
</sitemap>
</sitemapindex>
What does an XML sitemap do for SEO?
It helps search engines find your pages and notice changes, which matters for new, deep or poorly linked pages. It does not make a page rank higher, and a URL listed in a sitemap can still be left out of the index if the page itself is weak or blocked.
What is the difference between an XML and an HTML sitemap?
An XML sitemap is a file for crawlers, in the format the protocol defines. An HTML sitemap is an ordinary web page that lists your pages for people, which also gives crawlers more links to follow. They do different jobs, and a site can have both. Our sitemap generator gives you the XML file and a plain HTML list you can paste into a page.
Do you need a sitemap?
Not always. Google says you might not need one if your site is small, “about 500 pages or fewer”, is well linked internally, and has few media or news pages (Google’s sitemaps overview). It helps most when a site is large, new with few links pointing at it, or full of pages that are hard to reach by clicking. It costs little either way, and most CMSs build one automatically.
What about image, video and news sitemaps?
They are extensions of the same format with extra tags, for sites where those matter: Google documents image sitemaps, video sitemaps and news sitemaps. A news sitemap, for example, should only list articles created in the last two days. Most sites only need the ordinary sitemap.
How do you make one?
Most platforms do it for you: WordPress has a built-in sitemap and SEO plugins make their own, and Shopify, Wix and Squarespace generate one automatically. For anything else, the free XML sitemap generator crawls your site and writes one, and the sitemap validator checks the result. Then submit it.
Frequently asked questions
Is a sitemap a ranking factor?
No. It helps search engines find and recrawl pages. Whether a page ranks depends on the page.
Where should the sitemap file go?
At the root of your site, such as https://example.com/sitemap.xml. A sitemap only covers its own folder and below, and only its own host.
How is a sitemap different from robots.txt and llms.txt?
robots.txt says which paths crawlers may request; a sitemap lists the pages you want indexed; llms.txt is a short, curated index for AI tools. The comparison guide covers all three.
Should I list every page?
Every page you want indexed, and nothing else. Leave out noindex pages, redirects, duplicates and error pages.