XML Sitemap
An XML sitemap is a structured file listing a website's URLs that helps search engines discover and index its pages more efficiently. Written in XML, it can also pass metadata for each URL — the date of last modification, change frequency or priority. For bots it is a road map of the site, especially valuable on large, complex or poorly interlinked websites.
How an XML sitemap works
The file contains a set of entries, each describing one URL. Typical elements include:
- loc — the full, canonical page address,
- lastmod — the date the content was last modified,
- changefreq — a suggested change frequency (an advisory hint),
- priority — a page's relative importance within the site.
For very large sites, sitemap index files are used to group many individual sitemaps. A bot such as a search engine crawler treats the sitemap as a hint, not a command — it aids discovery but does not replace quality internal linking.
XML sitemaps in practice
An XML sitemap is a near-mandatory part of technical SEO. It is placed in the site root, referenced in robots.txt and submitted in Google Search Console, where its processing can be monitored. Best practices include listing only canonical, indexable URLs (no redirects, 404s or noindex pages), keeping the lastmod date accurate, and generating the sitemap automatically via the CMS or a plugin so it always reflects the current state of the site.
Powiązane pojęcia
Najczęstsze pytania
Does an XML sitemap guarantee a page will be indexed?
No. A sitemap is only a hint about which URLs are worth visiting. Whether a page enters the index depends on its quality, the absence of blocks (noindex, robots.txt) and value signals. A sitemap helps discovery but does not force indexing.
Where should an XML sitemap go and how do I submit it?
The file usually sits in the domain root (e.g. /sitemap.xml) and its address is referenced in robots.txt. It is also submitted in Google Search Console, which speeds up discovery and lets you monitor the sitemap's processing status.
