A sitemap is an online directory of URLs throughout your site. Sitemaps come in two distinct types: HTML and XML. What’s the difference between HTML and XML Sitemaps? HTML sitemaps help site visitors navigate the site, whereas XML sitemaps help search engines like Google discover the site’s content and features.
XML sitemaps are beneficial for very large sites because they make sure web crawlers from search engines prioritize the most important pages. It’s also possible to include metadata e.g. the page title, and directives e.g. alt tags, in XML sitemaps instead of including them in each page’s code.
Google Search Console also uses XML Sitemaps to determine how to crawl a website and pull information from key pages. Structuring sitemaps to follow the site taxonomy makes the information from Google Search Console significantly more actionable.
Ideally, sitemaps should only feature valid URLs that return a 200 response code. If a sitemap includes too many invalid URLs, a search engine may completely ignore it.