Key takeaways

  • An HTML sitemap is a page for people who are lost. An XML sitemap is a file for search engines. They do different jobs and should be cleaned up together.
  • Your XML sitemap should list only the canonical URLs you want in Google’s results, written as full absolute URLs, and in practice only pages that return a normal 200 response.
  • Google uses lastmod only if it is consistently and verifiably accurate, and it ignores priority and changefreq. Update lastmod when a page really changes, not on every build.
  • Large sites can split sitemaps by section in a sitemap index. Those sections work best when they mirror your main menu.
  • A sitemap is a hint, not a substitute for navigation. Every page you care about still needs a normal crawlable link from another page on your site.

Most “site map chaos” I see is a main menu that grew one item at a time, an HTML sitemap nobody has opened since launch, and a plugin-generated XML sitemap listing everything in the database. Cleaning these up together is a core part of the technical SEO site architecture work I do, because the three should describe the same site in the same way: one structure, shown to people through the menu and to search engines through the sitemap.

Navigation is where the user and the search engine meet, so if you want the reasoning behind menus, labels and page depth from the visitor’s side, my article on how user experience shapes SEO website architecture is the companion to this one.

I first published this article in 2025 under a louder title with figures I could not stand behind, and I have rewritten it as a practical clean-up guide built only on what Google and the W3C actually document.

What sitemap chaos looks like

Put the menu, the HTML sitemap and the XML sitemap side by side and the symptoms show. The menu has sections the sitemap lacks, or the other way round. The HTML sitemap links to pages that redirect or no longer exist. The XML sitemap lists tag archives, filtered URLs, test pages and old campaign pages, while a few important service pages are missing from it because they were built with a different template.

A website menu with three coloured groups beside a long page list, with crossed lines between them and warning marks on broken entries
Figure 1. Sitemap chaos is when the menu and the sitemap describe two different sites.

None of this usually stops Google from finding a site. What it does is send mixed signals: the menu says one set of pages matters, the sitemap says another. The fix is not a new plugin. It is deciding what the site’s sections are and making every map of the site agree.

HTML sitemap vs XML sitemap – what each one is for

The two share a name, which causes most of the confusion. Google’s sitemaps overview describes the XML kind: “A sitemap is a file where you provide information about the pages, videos, and other files on your site”. It is read by crawlers, not people.

An HTML sitemap is an ordinary page with links, written for visitors. The W3C treats it as an accessibility aid. Success criterion 2.4.5 in the WCAG 2.2 Understanding Multiple Ways page says “More than one way is available to locate a web page within a set of web pages”, and a site map (technique G63) is one of the listed ways, alongside a search function, a table of contents and links to related pages. The same page notes that on a very small site, the links on the home page can serve as the site map.

Question HTML sitemap XML sitemap
Who reads it Visitors, including people using assistive technology Search engine crawlers
What it lists The main sections and the pages people look for The canonical URLs you want in search results
Where it lives A normal page, usually linked from the footer A file submitted in Search Console or named in robots.txt
What it should mirror The main menu’s sections The same sections, split into files if the site is large

Do you need both? Google’s overview says you might not need an XML sitemap if your site is small, “about 500 pages or fewer”, and “comprehensively linked internally”. You are more likely to need one if the site is large, new with few external links, or heavy on video and images. An HTML sitemap is optional too, but on sites with deep sections I still find it useful.

Free tool · SEO ROI Calculator

Deciding which menu sections deserve the most attention? Estimate what their main keywords could be worth.

Enter search volume, CPC and your current ranking to estimate traffic, revenue and value for a keyword. Free.

Calculate your SEO ROI →

XML sitemap hygiene – only canonical pages that work

The single most useful rule comes from Google’s guide to building a sitemap: “Include the URLs in your sitemap that you want to see in Google’s search results.” Google adds that these are the canonical URLs, and that you should “Use fully-qualified, absolute URLs in your sitemaps.”

Page cards falling into a funnel, with rejected and duplicate pages sent to a bin and a clean sitemap file coming out below
Figure 2. Filter the sitemap so only canonical, working pages reach it.

In practice, a URL belongs in the XML sitemap only if it returns a normal 200 response, is not set to noindex, and is the version you name as canonical. That usually means removing:

  • URLs that redirect, including the http versions of https pages.
  • URLs that return errors or point to deleted pages.
  • Pages marked noindex, such as thank-you pages or internal search results.
  • Duplicates whose canonical tag points to a different URL, such as filtered or parameter versions of a category.

Google’s guide to consolidating duplicate URLs explains why this matters. “All pages listed in a sitemap are suggested as canonicals”, and it warns: “Don’t specify different URLs as canonical for the same page using different canonicalization techniques”. It also says plainly: “Don’t include the HTTP version of your pages in your sitemap”. A sitemap is only a weak canonical signal, so one that contradicts your canonical tags simply muddies them.

For the setup steps, see my guide to generating and submitting an XML sitemap.

Honest lastmod dates and a sitemap index

Many sitemaps set every lastmod to the time the file was generated, which makes the field useless. Google’s guide says “Google uses the <lastmod> value if it’s consistently and verifiably” accurate, and that “The <lastmod> value should reflect the date and time of the last significant update to the page.” A new copyright year is not a significant update. A rewritten section or new prices are.

The same page states that “Google ignores <priority> and <changefreq> values”, so there is no point tuning them. Spend that effort making lastmod truthful instead.

Size is the other reason sitemaps get messy. Google’s limit is 50MB uncompressed or 50,000 URLs per sitemap file. Past that, or earlier if it helps you manage the site, you split the sitemap and list the parts in a sitemap index. Google says “A sitemap index file may have up to 50,000 <loc> tags”, that the referenced sitemaps “must be hosted on the same site as your sitemap index file” unless you have set up cross-site submission, and that an index “can only contain sitemaps that are in the same or deeper directory.”

I prefer to split by section even on mid-sized sites: one sitemap for services, one for the blog, one for products or locations. When Search Console’s Sitemaps report shows a problem, you see straight away which part of the site it belongs to. You can submit through that report or add a Sitemap line to robots.txt, and Google is clear that submitting “is merely a hint”.

Free tool · Ping My URL

Cleaned up your sitemap and fixed the pages behind it? Let search engines know about the updated URLs.

Notify Google and other search engines about up to 5 new or updated URLs at once. Free, no sign-up.

Ping your URLs →

Make the menu match the sitemap’s sections

This is the part most clean-ups skip. If the XML sitemap is split into services, guides and locations, the main menu should show those same three groups with the same names, and the HTML sitemap should list them in the same order. Then a visitor, a crawler and you, months later, all read the same structure.

A navigation bar with three coloured groups lined up above three matching sitemap files and three matching sections of an HTML sitemap page
Figure 3. Menu groups, XML sitemap files and HTML sitemap sections that follow the same structure.

A sitemap does not replace links. Google’s guidance on crawlable links says “Every page you care about should have a link from at least one other page on your site”, and that Google can generally only crawl a link if it is an <a> element with an href attribute. Menus built from buttons and click handlers can look fine and still give crawlers nothing to follow. Links added with JavaScript are fine if they use that standard markup.

The same page says good anchor text is “descriptive, reasonably concise, and relevant to the page that it’s on”. For menus, that means labels people would actually search for, such as “Boiler repair” rather than “Solutions”, and the same label in the menu, the HTML sitemap and the page heading.

A clean-up routine you can repeat

This is the order I work in when navigation and sitemaps have drifted apart. On bigger sites, take one section at a time.

  1. Write down the site’s sections in plain words, the way a customer would describe them. This list becomes the menu, the HTML sitemap and the sitemap split.
  2. Export every URL in the current XML sitemap and check each one’s response code, canonical tag and robots meta tag. Remove anything that is not a working, indexable, canonical page.
  3. Look for the opposite problem: important pages that are missing from the sitemap or have no internal links pointing to them.
  4. Fix lastmod so it changes only when the content changes, and drop any reliance on priority or changefreq.
  5. Rebuild the menu and the HTML sitemap around the section list, with descriptive labels and crawlable links.
  6. Resubmit the sitemap or sitemap index in Search Console and check the Sitemaps report for errors.
  7. Repeat the check whenever a new section, template or plugin is added.

Rank Check Reports

Restructuring your menu and sitemaps? Record where your key pages rank before and after the change.

A live Google check of your keywords on desktop and mobile · from $14.99 per check · no subscription · report within one working day

Order a rank check report →

FAQ

Should noindex or redirected pages be in my XML sitemap?

No. Google asks you to include the URLs you want to see in its results, and those are your canonical URLs. A redirect, an error page or a noindex page is not one of them.

Does Google use priority and changefreq?

No. Google’s sitemap documentation says it ignores both. It does use lastmod, but only when the value is consistently and verifiably accurate.

When do I need a sitemap index?

When a single sitemap would go over 50,000 URLs or 50MB uncompressed. Many sites also use one earlier, to split sitemaps by section so problems are easier to trace.

Eugen Platon

Eugen Platon

Director of SEO & Web Analytics at onwardSEO
Eugen Platon is a highly experienced SEO expert with 16+ years of experience propelling organizations to the summit of digital popularity. Eugen, who holds a Master's Certification in SEO and is well-known as a digital marketing expert, has a track record of using analytical skills to maximize return on investment through smart SEO operations. His passion is not simply increasing visibility, but also creating meaningful interaction, leads, and conversions via organic search channels. Eugen's knowledge goes far beyond traditional limits, embracing a wide range of businesses where competition is severe and the stakes are great. He has shown remarkable talent in achieving top keyword ranks in the highly competitive industries of gambling, car insurance, and events, demonstrating his ability to traverse the complexities of SEO in markets where every click matters. In addition to his success in these areas, Eugen improved rankings and dominated organic search in competitive niches like "event hire" and "tool hire" industries in the UK market, confirming his status as an SEO expert. His strategic approach and innovative strategies have been successful in these many domains, demonstrating his versatility and adaptability. Eugen's path through the digital marketing landscape has been distinguished by an unwavering pursuit of excellence in some of the most competitive businesses, such as antivirus and internet protection, dating, travel, R&D credits, and stock images. His SEO expertise goes beyond merely obtaining top keyword rankings; it also includes building long-term growth and optimizing visibility in markets where being noticed is key. Eugen's extensive SEO knowledge and experience make him an ideal asset to any project, whether navigating the complexity of the event hiring sector, revolutionizing tool hire business methods, or managing campaigns in online gambling and car insurance. With Eugen in charge of your SEO strategy, expect to see dramatic growth and unprecedented digital success.
Eugen Platon
Check my Online CV page here: Eugen Platon SEO Expert - Online CV.