A sitemap is a file that lists the pages on a website you want search engines to find, with optional dates for when each page last changed.
Crawlers read it to find URLs they miss when they follow links. A sitemap is a map of your site written for machines. The usual format is XML, saved at the site root as /sitemap.xml.
An XML sitemap is a structured text file that follows the sitemaps.org protocol and gives each URL its own entry. In SEO it helps search engines discover pages. It tells Google and Bing which canonical pages exist and when they changed, but it can't force either engine to index or rank a page. Google's documentation limits one file to 50,000 URLs or 50MB uncompressed, so larger sites split their URLs across several files.
AI assistants can only cite pages that a search index has already found, and sitemaps help pages get found sooner. Bing's index feeds Copilot's answers. In a July 2025 Bing post, the Microsoft team wrote that "the lastmod field in your sitemap remains a key signal" for deciding which URLs to recrawl. An accurate sitemap gets updated pages into AI answers faster. Check that your lastmod dates change only when the content does.
A crawler fetches the sitemap and reads its URLs. It adds new or changed URLs to its crawl queue. Links are still the main way bots find pages. The sitemap catches what links miss, such as orphan pages and new posts that nothing links to yet. Google ignores priority and changefreq, so filling in those tags does nothing for you.
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>https://example.com/pricing</loc>
<lastmod>2025-06-04</lastmod>
</url>
</urlset>Each page sits inside its own `<url>` tag. The `<loc>` tag holds the full address and is the only required field. `<lastmod>` is optional and takes a date in the W3C format shown above. Save the file in UTF-8 and use absolute, canonical URLs.
The two main types are XML sitemaps, which are written for crawlers, and HTML sitemaps, which are ordinary web pages written for people. Both describe the same site, but each has a different reader.
An XML sitemap is a file that visitors never see. Search engines read its tags and dates. An HTML sitemap is a page of links, linked from the footer, that helps a lost visitor find a section. It passes internal links too, but it carries no lastmod data. Most sites today rely on the XML version and keep an HTML page only when their navigation is deep.
Image and video sitemaps add details about the media on a page, such as a video's duration. News sitemaps list recent articles for Google News. And a sitemap index is a file that points to other sitemaps. A site past the 50,000-URL limit needs one.
Your site needs a sitemap when it's large or new. Sites with weak internal links or heavy media content also need one. Google says a site of about 500 pages or fewer that links to every important page from the home page doesn't need one. Most content management systems create a sitemap anyway, and leaving it switched on costs nothing. Check that it leaves out redirects and pages set to noindex.
You submit a sitemap in Google Search Console's Sitemaps report:
Also add the line `Sitemap: https://example.com/sitemap.xml` to your robots.txt file. Bing and other crawlers will then find the sitemap without a separate submission.
Now that you know what a sitemap is, open yourdomain.com/sitemap.xml in a browser and see what's listed. If the file is missing, look in your CMS settings. If it's there, audit its URLs against the pages you want in search results.
Look up more AI search and SEO terms in our glossary.
Related terms
All termsSee how AI talks about your brand