XML sitemap versus HTML sitemap
The XML sitemap is for machines: a plain list of addresses, optionally with the last-modified date of each. An HTML sitemap is a page for people, listing every section with links; few sites need one now that menus and footers do the job. When someone says 'sitemap' in an SEO conversation they mean the XML file.
What a good sitemap contains
- Every page you want in search, and nothing else. No redirecting pages, no 'noindex' pages, no login or thank-you pages.
- Accurate last-modified dates. A sitemap that says every page changed today, every day, teaches Google to ignore the dates.
- Under 50,000 addresses and 50 MB per file. Larger sites split into several sitemaps listed in a sitemap index.
- A reference in robots.txt (Sitemap: https://yourdomain.com/sitemap.xml), and a submission in Google Search Console and Bing Webmaster Tools.
WordPress generates one automatically, and SEO plugins improve it; Shopify, Squarespace and Wix generate theirs; custom sites build theirs from the data. On this site it is generated from the same lists that build the pages, so a new page cannot be forgotten.
What a sitemap does not do
Listing a page does not make Google index it, and it certainly does not make it rank. Google decides what to index based on quality and whether the page seems useful; a sitemap just makes sure it has seen everything. If pages are listed but not indexed, Search Console's Pages report says why, which is the starting point for why a website is not showing up on Google.
