XML vs HTML Sitemaps: What Each One Does
·
By the Web Design Compass team

Short answer
An XML sitemap is a file written for search engines. It lists the URLs you want crawled and can add details such as when each page last changed. An HTML sitemap is an ordinary page of links that helps visitors find their way around. They do different jobs, and a site can run both.
What an XML sitemap does
An XML sitemap lists the pages, videos and other files on a site so search engines can crawl it more efficiently. Each entry gives a page's full URL. It can also carry the date of the last significant update, alternate language versions, and extra detail about images, video or news articles.
Google uses the lastmod date only when it's consistently and verifiably accurate, and it ignores priority and changefreq values. A change to the main content, structured data or links counts as significant. A new copyright year in the footer doesn't.
A sitemap helps search engines discover URLs, but Google says it doesn't guarantee that every item in it gets crawled and indexed.
What an HTML sitemap does
An HTML sitemap is a regular page on the site that lists links to the site's pages and sometimes a line describing each one. It's written for people. A 2005 post on Google's Search Central blog encouraged HTML sitemaps because they make a site easier to navigate, though Google now flags that post as old and notes some of its information may be outdated.
Search engines can still use it. Google follows links written as standard anchor elements with an href, so a page linking to every section gives its crawler another route in. Google doesn't accept it as a sitemap file, since the formats it takes are XML, RSS, mRSS, Atom 1.0 and plain text.
XML and HTML sitemaps side by side
XML sitemap | HTML sitemap | |
|---|---|---|
Written for | Search engine crawlers | Visitors |
Format | An XML file, usually at the site root | A normal web page |
Extra data | Last-modified date, language versions, media and news details | Optional descriptions of each page |
Submitted to Google | Optional, through Search Console, its API or a line in robots.txt | No; Google finds it like any other page |
Size limits | 50MB uncompressed or 50,000 URLs per file | No sitemap limit applies |
Which sites need which
Google says a site might not need an XML sitemap if it has about 500 pages or fewer that matter in search, links to all of them from its menus and pages, and has few videos, images or news articles it wants in results. Google lists the cases where a site might need one: a large site, a new site with few links from other sites, and a site with a lot of video, images or Google News content.
An HTML sitemap pulls its weight on sites with deep content, such as large catalogs or documentation libraries, where the main menu can't show every section. On a 10-page site with clear navigation it adds little.
Rules an XML sitemap has to follow
One file can hold up to 50,000 URLs or 50MB uncompressed. Larger sites split the list into several sitemaps and tie them together with a sitemap index file, which can list up to 50,000 sitemaps of its own.
The file must be UTF-8 encoded. Google recommends placing it at the site root, because a sitemap inside a folder only covers pages in that folder unless it's submitted through Search Console.
Every entry uses the full, absolute URL (https://www.example.com/page, never just /page).
Only the canonical version of each page belongs in the file. If the same content loads at several URLs, the sitemap lists the preferred one.
The order of URLs in the file makes no difference to Google.
Getting an XML sitemap to Google
Google lists these routes, and it calls submission a hint that doesn't guarantee the file will be used:
The Sitemaps report in Google Search Console, which also shows when Googlebot last read the file and any errors it hit.
The Search Console API, for teams that submit sitemaps programmatically.
A Sitemap: line anywhere in the robots.txt file, pointing to the sitemap's full URL.
WebSub, for sites using an RSS or Atom feed as their sitemap.
Related rankings
Frequently asked questions
Do I need both an XML and an HTML sitemap?
Not always. Google says most sites benefit from an XML sitemap, and a site on a CMS has likely been given one already. An HTML sitemap is optional and worth adding once the site is big enough that visitors struggle to reach sections through the menu.
Do I need to submit my sitemap to Google?
Submission is optional. Google can find a sitemap listed in robots.txt, and it can discover well-linked pages without any sitemap. Submitting in Search Console does have one clear benefit, since the Sitemaps report shows when Google read the file and flags processing errors.
Does a small website need an XML sitemap?
Often not. Google puts "small" at about 500 pages or fewer, and if every page can be reached by following links from the homepage, Google can usually find them. The exception Google names is a new site with few links from other sites, where Googlebot might not discover the pages without one.


