Sitemap.xml definition
Sitemap.xml is a file listing your site’s pages, images, and videos, helping search engines discover, understand, and index content efficiently, especially updates and multilingual versions.
What is Sitemap.xml?
Sitemap.xml is a simple file that lists the important pages on your website. Think of it as a roadmap for search engines like Google: it points them to your content and helps them understand how your site is organized. While search engines can find pages through links, a sitemap makes discovery faster and more reliable.
A sitemap can also include helpful details, such as when a page was last updated and if a page has versions in other languages. This is especially useful for large, new, or complex sites, or sites with lots of images and videos. Most websites benefit from having a sitemap at yoursite.com/sitemap.xml to support better crawling and indexing.
Why it matters for search and discoverability
Search engines work with limited time on your site. A sitemap tells them which URLs are important and what’s new, so they can crawl efficiently. It’s especially helpful for pages with few internal links (for example, seasonal landing pages or long‑tail blog posts), reducing the chance that valuable content is missed.
With optional details like last updated dates and alternate language versions, a sitemap sends clear freshness and localization signals. You can also include separate entries for images and videos. Submitting your sitemap in Google Search Console helps it get discovered quickly and lets you spot issues—leading to faster indexing, better coverage, and steadier search visibility.

How to create, maintain, and submit a sitemap
Generate it: Using Sanity? Add a simple script or a generator tool to output XML.
Keep it current: Ensure the sitemap updates when you publish, edit, or remove pages. Include last updated dates and, if relevant, alternate language versions. For very large sites, split into multiple sitemaps and use a sitemap index. List only canonical, indexable URLs; you can add separate sitemaps for images and videos.
Publish and submit: Host it at /sitemap.xml and reference it in robots.txt. Submit the URL in Google Search Console (and Bing Webmaster Tools). If your sitemap updates automatically, you usually don’t need to resubmit—it will be discovered.
Discover More with Sanity
With Sitemap.xml under your belt, it's time to see what Sanity can do for you. Explore our features and tools to take your content to the next level.
Last updated: