What Is a Sitemap? XML vs HTML Sitemap Explained
What is a sitemap?
A sitemap is a file that lists the pages, images and videos on your website, with details such as when each page last changed, so search engines can find and crawl them more efficiently.
- •The usual format is XML, often found at /sitemap.xml.
- •It is a hint: Google doesn't promise to crawl or index every URL in it.
- •Google says well-linked sites of about 500 pages or fewer may not need one.
- •Most CMSs, such as WordPress, Wix and Shopify, create one for you.
Google’s own definition is a file where you give information about the pages, videos and other files on your site, and how they relate. Search engines read it to crawl your site more efficiently. Think of it as a list you hand to Google and Bing that says: these are the URLs I care about, and this is when they last changed.
What a Sitemap Looks Like
Most sitemaps are XML files. Here is a complete, valid one with two pages:
<?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-09-20T10:30:00+00:00</lastmod>
</url>
<url>
<loc>https://www.example.com/pricing</loc>
<lastmod>2026-08-02</lastmod>
</url>
</urlset><loc>is the only required tag: the page’s full address. Google asks for absolute URLs (withhttps://and the domain) and crawls them exactly as listed.<lastmod>is the date the page last changed in a meaningful way. Google uses it only when it’s consistently accurate. Bing calls it a key signal for deciding what to recrawl, and asks for the full date and time format.<changefreq>and<priority>are optional tags from the original standard. Google’s documentation says it ignores both.
XML Sitemap vs HTML Sitemap
“Sitemap” can mean three different things, which is why searches for it return such mixed results:
| Type | Who it’s for | What it is |
|---|---|---|
| XML sitemap | Search engines | A machine-readable file, usually at /sitemap.xml, listing URLs and their last-change dates. This is what Search Console and Bing Webmaster Tools ask for. |
| HTML sitemap | Visitors | A normal web page, often linked in the footer, that links to your main sections and pages. It helps people, and it gives crawlers links to follow. |
| Design sitemap | Your team | A diagram of a site’s structure made while planning it. It never goes on the live site. |
For SEO, the XML sitemap is the one that matters. An HTML sitemap is optional, and useful mainly on large sites with deep sections. See HTML vs XML sitemaps for when to use both.
Other formats Google accepts
Besides XML, Google reads RSS, mRSS and Atom 1.0 feeds, and plain text files with one URL per line (sitemap.txt). XML sitemaps can also carry extra details through extensions: images, videos, news articles, and alternate language versions of a page.
Do You Need a Sitemap?
Google’s answer: if your pages are properly linked, it can usually find most of them without one. But it also says most sites benefit from having one. Its guidance splits it like this:
You probably need a sitemap if your site is large (it’s harder to make sure every page is linked), your site is new and has few links from other sites, or you have a lot of video and images or appear in Google News.
You might not need one if your site is “small,” which Google defines as about 500 pages or fewer that you want in search results, every important page can be reached by following links from the home page, and you don’t rely on media or news results.
If you use a CMS like WordPress, Wix or Blogger, Google notes you probably already have a sitemap and don’t need to do anything. Shopify and Squarespace also create one at /sitemap.xml.
How Search Engines Use Your Sitemap
A sitemap is a discovery tool, not an indexing button. Google says plainly that a sitemap doesn’t guarantee every item in it will be crawled and indexed, and that submitting one is “merely a hint.” Google still decides what to crawl and what to index on its own terms.
What a good sitemap does is remove guesswork: it lists pages that internal links might miss, and its lastmod dates point crawlers to what changed. Bing stresses this for AI search: in a July 2025 post, it said sitemaps remain a foundation for keeping content discoverable in AI-powered search such as Copilot, and that accurate lastmod values help it decide which URLs to recrawl for search results and AI answers. For changes you want picked up right away, Bing points to IndexNow alongside the sitemap.
Sitemap Rules That Trip People Up
- Size limits: one sitemap can hold 50,000 URLs or 50MB uncompressed. Bigger sites split it into several files and list them in a sitemap index.
- Encoding: the file must be UTF-8.
- Location: a sitemap only covers URLs in its own folder and below, unless you submit it in Search Console. That’s why Google recommends the site root.
- Which URLs: list the pages you want in search results. That means the canonical version of each page, returning 200, without a noindex tag. Redirects and 404s in a sitemap are wasted requests.
- Order doesn’t matter to Google.
How to Find a Website’s Sitemap
Try /sitemap.xml first, then /sitemap_index.xml (common with Yoast) and /wp-sitemap.xml (WordPress core). The most reliable place is the site’s robots.txt file, which often has a line like Sitemap: https://example.com/sitemap.xml. Our guide to finding a sitemap covers the rest, or let the free sitemap finder check robots.txt and the common paths for you.
How to Create a Sitemap
- WordPress: built in since version 5.5 at
/wp-sitemap.xml. SEO plugins such as Yoast or Rank Math replace it with their own. - Hosted builders (Wix, Shopify, Squarespace): created and updated automatically.
- Next.js: add
app/sitemap.ts(Next.js 13.3 and later) and it’s served at/sitemap.xml. See the Next.js sitemap guide. - Static or custom sites: generate it from your database or build step so it stays current, or use a crawler-based generator for small sites that rarely change.
Step-by-step instructions for each platform are in how to create a sitemap.
How to Submit a Sitemap
Google: in Search Console, open Indexing > Sitemaps, enter the sitemap URL and click Submit. The report then shows when Google last read it and any errors. You can also submit through the Search Console API. Bing: submit it in Bing Webmaster Tools; Bing says it tries to fetch a sitemap as soon as you submit it. Both: add a Sitemap: line to robots.txt, which any crawler can read. Step-by-step details are in how to submit a sitemap to Google.
A Short History
Google introduced the Sitemaps protocol (version 0.84) in June 2005. In November 2006, Google, Yahoo! and Microsoft announced joint support for version 0.90, the one still used today, published at sitemaps.org. In April 2007 they added the Sitemap: line in robots.txt, so crawlers could find sitemaps on their own.
FAQ
Is a sitemap necessary for SEO?
Not strictly. Google can find well-linked pages without one, and a sitemap won’t make a page rank. But it helps Google and Bing find new and updated pages, and Google says most sites benefit from one.
Does a sitemap get my pages indexed?
No. It helps search engines discover URLs. Whether they’re indexed depends on the pages themselves. If many sitemap URLs aren’t indexed, see crawled - currently not indexed and discovered - currently not indexed.
How often should a sitemap be updated?
Whenever pages are added, removed or meaningfully changed. Generating it automatically is the easiest way to keep it accurate.
Can a site have more than one sitemap?
Yes. Large sites often split sitemaps by section and list them in a sitemap index. Google notes that separate sitemaps also make it easier to track each section in Search Console.