Skip to content
SEO Evaluate
TREN (current language)ARFA
Related posts
SEO5 min read

What is a sitemap: XML, HTML and when you need each

What is a sitemap, and do you need one? The difference between XML and HTML sitemaps, what each does for crawlers and people, and when to skip them.

By Roozbeh Nazari · CEO

Summarize the article
What is a sitemap: XML, HTML and when you need each

What is a sitemap? In the simplest terms, it is a list of the pages on your site, written for someone who needs to find them. The word covers two quite different things, though. An XML sitemap is a file written for search engine crawlers. An HTML sitemap is a page written for people. They solve different problems, and many sites need one, both or neither. This guide explains what each one is, what it can and cannot do, and how to decide.

The XML sitemap: a file for search engines

Google describes a sitemap as a file where you provide information about the pages, videos and other files on your site and the relationships between them. Search engines read it to crawl the site more efficiently. It tells them which URLs you consider important and can add details such as when a page was last significantly updated, or which language versions exist.

A basic XML sitemap follows the sitemaps.org protocol. Each entry sits inside a url element with a loc element holding the full address of the page. The optional lastmod element carries the date of the last meaningful change. The protocol also defines changefreq and priority, but Google says it ignores both, so there is little point in tuning them.

A few rules from Google's documentation are worth remembering:

  • Use fully qualified, absolute URLs, not relative paths.
  • A single sitemap file is limited to 50MB uncompressed or 50,000 URLs. Larger sites split their URLs across several files and list them in a sitemap index.
  • The file must be UTF-8 encoded.
  • Only include canonical URLs that you want to appear in search, not redirects, error pages or duplicates.
  • Keep lastmod honest. Google uses it only when it is consistently and verifiably accurate.

You can tell Google about a sitemap by submitting it in the Sitemaps report in Search Console or by adding a Sitemap line to robots.txt. Submitting a sitemap is a hint, not a command. It does not guarantee that every listed URL will be crawled or indexed, and it does not improve rankings on its own.

The HTML sitemap: a page for people

An HTML sitemap is an ordinary page, usually linked from the footer, that lists the main sections and pages of the site. Its audience is a visitor who cannot find what they need through the navigation or search box. It is useful on sites with deep structures, many service or location pages, or a large archive.

Because it is a normal page with links, an HTML sitemap also gives crawlers another path to the pages it lists. That is a side benefit, not the main reason to build one. If your navigation and internal linking are already clear, an HTML sitemap adds little. If they are not, fixing the navigation usually helps more than adding a list at the bottom of the site.

What is a sitemap XML file for, and when do you need each type?

Google's own guidance gives a useful starting point. You probably benefit from an XML sitemap if:

  • The site is large, so crawlers may miss new or recently updated pages.
  • The site is new and has few external links pointing to it.
  • The site has a lot of rich media such as video and images, or appears in Google News.

You might not need one if the site is small (Google mentions around 500 pages or fewer), well linked internally and has no significant media or news content. In practice, most modern CMSs and frameworks generate an XML sitemap automatically, so the question is less "should we create one?" and more "is the one we have correct?"

An HTML sitemap is worth adding when visitors struggle with navigation, when the site has many similar pages grouped in ways the menu cannot show, or when accessibility testing shows that users rely on it. For a small brochure site it is usually optional.

Common sitemap mistakes

  • Listing URLs that redirect, return errors or carry a noindex tag.
  • Mixing non-canonical versions, such as parameter URLs or both http and https.
  • Setting every lastmod to today's date on every build.
  • Forgetting language versions on multilingual sites, or listing them inconsistently.
  • Never checking the Sitemaps report after submission.

If you are choosing how to produce the file, our comparison of a sitemap generator versus a framework sitemap covers the trade-offs. Sitemap checks are a standard part of our technical SEO audits, alongside crawl, indexing and internal-linking reviews.

Sources

// CONTACT

Drop a brief. Send us your brief.

Our intro call is free. Once we have your brief, we'll map the market opportunity and your highest-priority growth opportunities.