What is sitemap.xml?
sitemap.xml is an XML file on a site that contains a structured list of its pages available for indexing.
What a sitemap gives you
This file helps search engines:
- find pages faster, even if there are few internal links to them;
- understand the site's structure;
- take into account updates and new URLs.
What a sitemap contains
A sitemap typically contains:
- page addresses;
- the date of the last update (
<lastmod>); - priority (
<priority>); - change frequency (
<changefreq>, which is barely used today).
Example fragment
xml
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>https://site.com/</loc>
<lastmod>2025-01-01</lastmod>
</url>
<url>
<loc>https://site.com/blog/</loc>
</url>
</urlset>File location
The file is placed at the standard path:
javascript
https://site.com/sitemap.xmlA sitemap does not guarantee indexing, but it significantly increases the chances, especially for large and complex sites.
Short Answer
Interview readyPremium
A concise answer to help you respond confidently on this topic during an interview.