Online Marketing Guy
Back to glossary

XML sitemap

An XML sitemap is a file that lists the URLs of a website you want search engines to crawl and index, helping them discover pages faster.

What is an XML sitemap?

An XML sitemap is a machine-readable file, usually located at /sitemap.xml, that lists the URLs of a website you want search engines to crawl and index. It can also include the date each page was last modified. A sitemap does not guarantee indexing, but it helps search engines discover pages faster – especially new pages, large websites and pages with few internal links.

Good practice for XML sitemaps:

  • Only include indexable URLs: No redirects, error pages, pages blocked by robots.txt or pages with a canonical tag pointing elsewhere.
  • Keep it up to date: Generate the sitemap automatically so it reflects the live site.
  • Split large sites: A single sitemap may contain up to 50,000 URLs; larger sites use a sitemap index that points to several files.
  • Submit it: Reference the sitemap in robots.txt and submit it in Google Search Console and Bing Webmaster Tools.

For multilingual websites, the XML sitemap is also one of the three supported places to declare hreflang relationships – a practical option when adding hreflang to every page’s HTML is difficult.