HTML vs XML Sitemap: Which Should You Use?

HTML vs XML Sitemap: Which Should You Use?

Adrijan Arsovski Avatar
Adrijan Arsovski Avatar

Disclosure: Our content is reader-supported, which means we earn commissions from links on Crazy Egg. Commissions do not affect our editorial evaluations or opinions.

An XML sitemap is a file that contains information about your website’s most important URLs and how they link to one another. It helps Google and other search engines crawl and index your site more effectively.

Here’s an example of PepsiCo’s XML sitemap:

An HTML sitemap is a web page that lists all essential links to your website’s most prominent pages and categories. Back in the day, it used to be recommended for SEO and indexing purposes. Today, however, an HTML sitemap has fallen out of favor both with search engines and real users.

Here’s an example of PepsiCo’s HTML sitemap:

The Simple Answer: Always Use an XML Sitemap

If you’re thinking about using an XML or an HTML sitemap, don’t. Always use an XML sitemap without an exception.

HTML sitemaps are a thing of the past. Thanks to modern site navigation, search engine algorithms, and advancements in AI, there’s no real reason to worry about an HTML sitemap because not a single user clicks through sites endlessly anymore.

The Benefits of XML vs HTML Sitemaps

Google provides reasons FOR and AGAINST having an XML sitemap. For example, it suggests that users with large sites, new sites, or content-rich sites should include an XML sitemap. 

On the other hand, users whose sites are small, have comprehensive internal linking, and don’t have many video or image files, are advised to exclude an XML sitemap from their site’s structure.

But, this should be taken with a grain of salt. In our opinion, every website could greatly benefit from having an XML sitemap, and here’s why.

XML sitemap benefits

First, if you don’t create an XML sitemap, Google and other popular search engines will have to use hyperlinks to discover and index your site. If your pages aren’t aptly linked, you risk missing out on proper indexing and discoverability, decreasing your chances to rank higher in the search engine results pages (SERPs)—or rank at all.

Second, the web is a large place and it continues to grow daily (Google defines the web as a nearly infinite space!). Because of this, it becomes increasingly harder for search engines to crawl and index everything without occasionally missing a few pages.

This is reflected through the concept of a crawl budget, which represents the time, resources, and effort Googlebot (Google’s web crawler) dedicates to crawling any specific site. Owners with moderately changing large (1M+ pages) and frequently changing medium (10K+ pages) sites must consider rationing their crawl budget to maintain a technically healthy and easily discoverable website.

In theory, an XML sitemap can help Googlebot find its way to your site, go through it more quickly, and perform its crawling magic without overwhelming your servers or breaking your site. Googlebot achieves this by balancing its crawl capacity limit and crawl demand in relation to your site’s connection and speed.

Third and final, XML is fully automated. This is why webmasters still prefer using an XML sitemap over an HTML sitemap. XML’s main value proposition is that once you set it up, it’s automatically updated as your site continues to change. Google automatically recognizes and indexes these changes, so you don’t have to perform any extra steps to ensure that your pages appear on the web.

HTML sitemap benefits

The main argument for using an HTML sitemap boils down to its visibility for human users. HTML sitemaps are visible and contain clickable links, while XML sitemaps kind of lurk in the background and serve as structural support for sites.

However, this is a flimsy argument. You can still access XML sitemaps simply by typing “sitemap.xml” after the top-level domain in your browser’s address bar. In fact, pulling up the XML sitemap will probably give you a better overview of that site’s hierarchy than trying to identify which hyperlink goes where in an HTML sitemap.

Other arguments in favor of HTML sitemaps are more contextually dependent. For example, some legacy sites (Amazon.com) that were hard-coded in HTML + CSS will have difficulty creating an XML sitemap without causing a major disruption in their daily operations. 

So, instead of risking breaking the site or deindexing its pages from the SERPs, such legacy sites will be better off including a hard-coded HTML sitemap as the more pragmatic solution.

Lastly, some proponents of HTML sitemaps would have them either replace or serve as an alternative to the so-called mega menus on sites. Mega menus are large and comprehensive drop-down maps that feature most, if not all website categories and subcategories in the form of hyperlinks.

This is probably the strongest case for using HTML sitemaps. Mega menus are very clunky to navigate, with menu items disappearing if you hover your cursor slightly outside the menu’s visual borders. They also feature a stupendous number of hyperlinks that could confuse and disorient the user.

A rare example of a somewhat useful HTML sitemap comes from Apple’s website. If you go to “apple.com/sitemap/”, you will notice a comprehensive HTML sitemap in the main body of the page and a shorter, succinct summary in the page’s footer.

Replacing your mega menu with an ordinary, compact menu or an HTML sitemap might be the way to go. Even then, if your site’s main navigation doesn’t work as intended, you likely have bigger structural issues to fix than worrying about XML or HTML sitemaps.

Does Google prefer XML or HTML sitemaps?

At the end of the day, it doesn’t really matter. All Googlebot needs to do is easily find, crawl, and index the most important pages on your website. Sometimes, it can do that without accessing your sitemap at all. In other cases, structurally messy sites without a sitemap have been known to outperform well-structured sites with a sitemap in terms of search visibility and rankings.

This doesn’t mean that you should altogether avoid using a sitemap (HTML or XML). It does mean however that Google can sometimes disregard or override your site’s crawling rules, even if they’re clearly stated in your “robots.txt” file.

Nonetheless, an XML sitemap is a more foolproof way to get Google what it needs. Every Google Search Console (GSC) account has a Sitemap section where you can check your XML sitemaps. This is a straightforward and low-effort approach to make sure everything is working correctly.

If you have a working XML sitemap along with a good website architecture, there’s no reason to add a completely new HTML sitemap on top of all that. Two different sitemaps might introduce a whole new range of errors, conflicts, and bugs that could take months to resolve, resulting in more headaches than benefits in the long run.

Is there ever a reason to have an HTML sitemap?

No, not really. People rarely use it, and search engines don’t care about an HTML sitemap.

Assuming your site has a proper implementation of content categories, breadcrumbs, and internal linking, these features will help Google crawl your website without requiring an HTML sitemap.

It’s better to focus on web features that help people, including easy navigation, advanced search functionality, technical SEO, helpful content, and responsive design. An HTML sitemap won’t be helpful to anyone, least of all well-informed and technically apt web users.

Does Every Site Need an XML Sitemap?

The answer is: Yes. Every site can benefit from having a properly implemented XML sitemap.

If you run a single-page website, you can skip adding an XML sitemap since everything lives on your homepage under the umbrella of a single URL address.

What’s the best way to set up an XML sitemap?

Setting up an XML sitemap will depend on the features and capabilities of your preferred content management system (CMS).

If you’re using WordPress, it takes five minutes to install and activate an XML sitemap. If you’re a non-WordPress user, installing an XML sitemap may take some extra steps. Here’s how to do both.

Setting up an XML sitemap for WordPress users

For users of WordPress 5.5 and above, WordPress will automatically generate an XML sitemap once your WP-powered website goes live. But, a better and more reliable approach would be to use a plugin to generate your XML sitemap, and here’s how.

1. Log in to your WordPress account.

2. Go to Plugins, Add New Plugin

3. Search and install the Yoast SEO plugin

4. Navigate to Yoast SEO, Settings

5. Enable the XML sitemap feature

That’s it! The Yoast plugin will automatically update the XML sitemap for you, so you never have to think about it again. Serious website and SEO professionals don’t spend any time managing or thinking about their sitemaps. Simply set it up, automate it, then move on to other tasks.

For a more detailed, step-by-step explanation on generating an XML sitemap with the Yoast plugin, visit our website sitemap guide.

Setting up an XML sitemap for non-WordPress users

Website hosting platforms such as Shopify, Wix, and Squarespace will automatically generate an XML sitemap once you sign up for their services and publish your website. They will also automatically update your “sitemap.xml” file with any new URLs you add, remove, or change.

For Drupal users, you need to install a Drupal module called XML sitemap or Simple XML Sitemap and generate your XML sitemap from there.

For Joomla users, you need to use the OSMap Joomla extension, which offers free and paid plans. Once you choose your plan, download and install OSMap in your Joomla control panel, configure your settings, and create your XML sitemap.

For users with manually coded or legacy websites, use XML-sitemaps.com to generate an XML sitemap. It’s free for websites with up to 500 unique pages, and $49.99/one time for websites that house more than 500 pages.
For hardcore users who want to have full control over their site’s technical health, use Screaming Frog. It’s free for sites with up to 500 unique pages, and $259/year for unlimited use.


Scroll to Top