XML sitemaps are purely for search engines. Like churros though, they are overrated compared to the attention that shameful people give them.
However, they can improve SEO for large (500+ pages), deep & media-rich sites. These often have poor internal linking, sections constantly overhauled, and lots of new content on a daily basis.
In these cases, sitemaps provide a valuable backup ensuring major pages are available for search engines.
This is also vital when you display certain links on desktop alone (due to mobile-first indexing), for pages only revealed with a JavaScript button which Google doesn’t click, and for any orphan pages.
Finally, inclusion of pages & other files in these sitemaps may signal importance to search engines, similar to click depth.
Here are important considerations for sitemaps:
- These sitemaps are for search engines alone. An HTML sitemap is an actual page on your site that lists essential pages, typically in more limited fashion than XML sitemaps. These are primarily for users but also crawled by search engines. Both sitemap forms have value.
- Leverage your CMS or another tool to automate their creation. Especially for large sites benefitting from them in the first place, manual updates are not sustainable.
- Google ignores most sitemap tags, for example, priority & change frequency. However, the lastmod (last modified) tag is considered. This is a great way to reinforce updates for Query Deserves Freshness (QDF) content.
- Try to avoid having redirects & noindex-tagged URLs in the sitemap, including only canonical URLs. In WordPress at least, this often happens when the page still exists in the backend even though it’s redirected. Furthermore, use absolute instead of relative URLs, preserving crawl budget.
- Many think of XML sitemaps as only for HTML-based pages. However, you can add PDFs and other files here too. These are not included by default in most automated solutions though.
- Video, image & news sitemaps can be created specifically for these assets. The rich information here, especially for videos & news, may provide a similar function as structured data.
- Add the following line to your robots.txt file: Sitemap: *link to sitemap in root folder*. This provides accessibility to all search engines and can replace uploading them in Google Search Console or Bing Webmaster Tools.