Technical Concepts
Sitemap.xml

Sitemap.xml

Sitemap.xml is an XML file that lists a site’s URLs for search engines, with optional details such as each page’s last modified date. It follows the sitemaps.org protocol and helps crawlers find pages.
June 28, 2026
Cihan Geyik
Table of Content

Web crawlers find most pages by following links. A sitemap.xml file gives them a second route: a list of the URLs you want crawled, with the date each one last changed. It helps most on large sites, new sites and pages with few internal links. Listing a URL doesn’t make a search engine index it, though.

A sitemap is a hint. Search engines use it to find and prioritize URLs. They still decide what to crawl and what to index.

What does a sitemap.xml file look like?

The format comes from the sitemaps.org protocol, which the major search engines support. A minimal file looks like this:

https://www.example.com/pricing 2026-10-14 https://www.example.com/blog/ai-search-guide 2026-10-02T09:30:00+00:00

The file must be UTF-8, and characters such as ampersands in URLs must be escaped. Most sites serve it from the root, at /sitemap.xml.

Required and optional tags

TagRequired?What it doesHow Google treats it
urlsetYesWraps the whole fileRequired
url and locYesOne entry per page, with its full URLCrawls the URL exactly as written
lastmodNoDate the page last changedUsed if consistently and verifiably accurate
changefreqNoHow often the page is expected to changeIgnored
priorityNoRelative importance within the siteIgnored

Google’s sitemap guidelines say it ignores priority and changefreq. The protocol itself calls changefreq a hint. An accurate lastmod is the optional tag that earns its place.

Sitemap limits and sitemap index files

One sitemap can list up to 50,000 URLs and must stay under 50MB uncompressed. Larger sites split their URLs across several files and list those files in a sitemap index:

https://www.example.com/sitemap-products.xml https://www.example.com/sitemap-blog.xml

An index can reference up to 50,000 sitemaps. Splitting by section, such as products and blog posts, also lets you read indexing data per section in Search Console.

How to submit a sitemap

  1. Add a Sitemap line to robots.txt. It can sit anywhere in the file and applies regardless of user-agent groups.
  2. Submit it in the Sitemaps report in Google Search Console, which shows when Googlebot last read it and any errors.
  3. Submit it in Bing Webmaster Tools for Bing, whose index also grounds Microsoft Copilot.
User-agent: *Allow: /Sitemap: https://www.example.com/sitemap.xml

Which URLs belong in a sitemap?

  • Canonical URLs that return 200 and are meant to be indexed.
  • Full absolute URLs, since Google crawls them exactly as listed.
  • URLs on the same host and protocol as the sitemap, at or below its folder.
  • No redirects, 404s or noindex pages. They send mixed signals about what you want indexed.

A sitemap entry is also a weak canonical signal, so listing the wrong version of a duplicate works against you. Indexability covers the signals that decide which version gets stored.

Do sitemaps matter for AI search?

Indirectly, yes. A sitemap helps search engines discover and refresh pages, and AI answers built on those indexes can only cite what’s in them. Google’s AI Overviews and AI Mode draw on Google’s index, and Microsoft Copilot draws on Bing.

Page updated → lastmod changes in the sitemap → Crawler refetches the URL → Index stores the new version → AI answers can cite it

Bing has been explicit about it. In a July 2025 post on sitemaps in AI-powered search, Bing described lastmod as a freshness signal it uses to decide which URLs to recrawl. It asked for ISO 8601 dates that include the time, and recommended pairing sitemaps with IndexNow.

A sitemap still isn’t written for language models. For a curated summary of your best content aimed at AI tools, see llms.txt.

Common sitemap mistakes

  • Setting every lastmod to the time the file was generated. Google uses lastmod only when it’s consistently accurate, so fake dates waste the signal.
  • Listing redirected, noindexed or deleted URLs.
  • Using relative URLs, or mixing http and https.
  • Letting the file go stale after a migration, so it still lists old URLs.
  • Putting more than 50,000 URLs or 50MB in one file.
  • Expecting a sitemap to force indexing. It helps discovery, and the engine still decides.

Accurate dates pay off most when you update pages on purpose. Our post on refreshing content for AI search covers how to plan those updates.

How Ansvisor helps

A sitemap gets pages discovered, and Ansvisor shows whether they’re then cited. Its Site Audit checks robots.txt, canonical URLs and freshness signals on each page. Answer tracking then shows when updated pages start appearing as sources in ChatGPT, Gemini, Perplexity and Google’s AI features.

XML Sitemap, Sitemap File, Sitemap Index, Website Sitemap, Sitemaps Protocol

Let AI Search Work for Your Growth

Each prompt you win brings more mentions, more citations and more buyers. Ansvisor keeps finding the next one.

AI Answers Mentions Citations Visibility Score AI Share of Voice AI Traffic Revenue
Win Back Search VisibilityTry Ansvisor 14-day Free →✓ Zero risk. Cancel anytime.

FAQ

Frequently asked questions.

What is sitemap.xml?

Sitemap.xml is an XML file, usually at the root of a site, that lists the URLs you want search engines to crawl. It follows the sitemaps.org protocol and can include each page’s last modified date. Search engines treat it as a hint, not a command.

What tags does a sitemap.xml file need?

Only urlset, url and loc are required. The optional tags are lastmod, changefreq and priority. Google uses lastmod when it is consistently accurate and ignores changefreq and priority, so an accurate lastmod is the optional tag worth keeping.

How many URLs can a sitemap hold?

One sitemap can list up to 50,000 URLs and must be no larger than 50MB uncompressed. Bigger sites split URLs across several sitemaps and list them in a sitemap index file, which can reference up to 50,000 sitemaps.

How do I submit a sitemap to Google and Bing?

Add a “Sitemap:” line with the full URL to robots.txt, which any crawler can read. Then submit the sitemap in the Sitemaps report of Google Search Console and in Bing Webmaster Tools to see processing errors and last read dates.

Does a sitemap help AI search visibility?

Indirectly. A sitemap helps search engines find and refresh pages, and AI answers built on those indexes can only cite pages that are there. Bing has said accurate lastmod dates help it decide what to recrawl. A sitemap does not guarantee indexing or citations.

Explore Ansvisor

Everything You Need to Improve Your AI Visibility

Track how your brand appears across AI platforms, understand what drives visibility, and turn insights into measurable actions.

From AI Visibility insights to action.

Explore the complete Ansvisor platform for AI Search intelligence, optimization, and growth.

Explore the Platform
Ansvisor is an open-source and cloud-ready AI Visibility Platform that helps brands measure, understand, and optimize their brand's AI visibility across ChatGPT, Claude, Gemini, Google AI Overviews, and other AI search platforms.

Win customers from all major AI platforms

Understand, measure, and optimize your AI visibility via Ansvisor.

✓ Add brand, domains and competitors
✓ Discover prompts and growth opportunities
✓ Track your AI visibility across major AI platforms
✓ Monitor citations, mentions, and competitors
✓ Measure AI traffic and customer discovery
✓ Receive AI recommendations based on AI insights
✓ Optimize authority, trust, and content quality
✓ Create content, automate analysis & action with AI agents

Help us grow the AI Visibility Glossary

New terms are added regularly.

Help us improve the page or suggest a new term →
About the Author
Cihan Geyik

Cihan Geyik

Co-founder at Ansvisor

Cihan Geyik is the co-founder of Ansvisor, an open-source AI Visibility platform for AI Search. With more than 15 years of experience in digital marketing and growth, he writes about AI visibility, AI search, AEO, GEO, citations, and answer engines. He focuses on helping brands understand and improve their presence across ChatGPT, Gemini, Perplexity, Google AI Overviews, and other AI-powered discovery platforms.

GOOGLE PREFERRED SOURCE

Get more Ansvisor insights in Google

Add Ansvisor as a Preferred Source to see more of our AI Search, AEO, GEO, and AI Visibility insights across Google.