How to Create a Sitemap|The Difference Between XML/HTML Sitemaps and Creation Steps

August 5, 2026

Author: Shusaku Yosa
サイトマップの作り方|XML/HTMLサイトマップの違いと作成手順

To have search engines evaluate your website correctly, creating a sitemap is essential. However, many people get stuck at the first step, thinking things like "apparently there are different types of sitemaps," "I don't really understand the difference between XML and HTML," or "how do I even create one in the first place."

In this article, we first organize the difference between the two types of sitemaps (XML sitemaps and HTML sitemaps), then explain the specific steps to create each. We walk through everything from creating one with tools, to how to write the tags, to what to do after creation, so if you're about to prepare a sitemap, please use this as a reference.

What Is a Sitemap? Understanding the Two Types

A sitemap is a file or page that compiles information about the pages that exist within a website. It plays the role of a "map" showing the overall structure of the site, and there are broadly two types: XML sitemaps and HTML sitemaps.

These two differ clearly in terms of "who the sitemap is aimed at." Mistaking their roles means you won't get the intended effect, so first understand the difference between each.

XML Sitemap: For Search Engines

An XML sitemap is a file that conveys information about the pages within your site to search engine crawlers. It describes each page's URL, last modified date, update frequency, and so on in XML format, and is usually placed at the site root under the filename sitemap.xml. Human visitors rarely see it; it functions purely as a "catalog" that efficiently informs search engines of the existence and update status of pages.

HTML Sitemap: For Users

An HTML sitemap is a page that shows the overall picture of the site to users who visit the website. It organizes the pages within the site in list form by category, and can be browsed in a browser just like a normal web page. By making it accessible from places such as the footer, users can more easily find the pages they're looking for, which improves usability.

The Difference Between XML and HTML Sitemaps

Let's organize the difference between the two from the perspectives of purpose, target, format, and SEO effect.

  • Target: XML is for search engines (crawlers), HTML is for users (humans)
  • Purpose: XML promotes crawling and indexing, HTML improves on-site navigation and usability
  • Format: XML is a machine-readable file called sitemap.xml, HTML is a normal web page
  • Placement: XML is placed at the site root and submitted to Search Console, HTML is linked from the footer, etc.
  • SEO effect: XML has a direct effect through crawl support, HTML has an indirect effect through improved usability

These aren't an either-or choice; because their purposes differ, the basic approach is to prepare both. In particular, XML sitemaps are effective on sites with many pages or where internal links aren't sufficiently established. On the other hand, in recent years many sites have well-organized navigation and breadcrumbs, so the need for an HTML sitemap varies depending on the site's scale and navigation design.

Steps to Create an XML Sitemap

There are broadly two ways to create an XML sitemap: "generating it automatically with a tool" and "writing it manually." For most sites, the former is common.

Method 1: Use an Automatic Generation Tool

The easiest way is to use an automatic generation tool. Just by entering your site's URL, it crawls the pages within your site and generates sitemap.xml. Typical options are as follows.

  • Online generation tools: free tools that generate a sitemap just by entering a URL, no registration required. Suited to small-to-medium sites
  • Desktop crawlers: scan the entire site to create a detailed sitemap. Suited to medium-to-large sites
  • CMS plugins/features: on WordPress and similar, dedicated plugins or theme features can auto-generate and auto-update the sitemap

On sites where pages are added or updated frequently, manually recreating the file each time it changes isn't realistic. Choosing a mechanism that can auto-update the sitemap, such as a CMS plugin, greatly reduces the operational burden.

Method 2: Write the XML Manually

For small sites or when you want fine control over the generated content, you can also write it manually. An XML sitemap is composed of a combination of several tags. The basic tags are as follows.

  • urlset: the parent element enclosing the entire sitemap. Specify a namespace (xmlns)
  • url: the element enclosing the information for one page
  • loc: describes the page's URL (required)
  • lastmod: describes the page's last modified date
  • changefreq: describes a guideline for update frequency (optional)
  • priority: describes the relative priority within the site (optional)

There are a few points to note when writing. If a URL contains non-ASCII characters such as Japanese, encoding is required. Also, if you set priority to a high value for every page, it becomes meaningless, so the point is to set higher values only for important pages. For optional tags such as lastmod, if you can't maintain them accurately, don't force them; it will still function with just loc.

For Large Sites, Use Splitting and Index Files

There is an upper limit on the number of URLs that can be listed in a single XML sitemap. On very large sites with a huge number of pages, splitting the sitemap by purpose or category and preparing a "sitemap index file" that compiles them makes management easier. If you submit the index file, you can convey multiple sitemaps to search engines at once.

What to Do After Creating an XML Sitemap

An XML sitemap won't take effect just by creating it. You need to inform search engines of its existence. The main notification methods are the following two.

  1. Submit via Google Search Console: register and submit the sitemap URL. The most reliable method
  2. Describe it in robots.txt: list the sitemap URL within robots.txt to tell crawlers its location

Using Search Console, you can also check the post-submission indexing status and whether there are any errors. For the submission procedure and how to handle errors when they appear, checking a dedicated explainer article as well will make things smoother.

Steps to Create an HTML Sitemap

An HTML sitemap is created as a single listing page where users can survey the whole site. The basic steps are as follows.

  1. Organize the pages to include: classify the main pages by category and clarify the hierarchical structure
  2. Create the listing page: arrange category headings and links to pages in list form
  3. Place it on the site: link the created page so it's accessible from places such as the footer

If you're using a CMS, a common method is to create it as a fixed page and place it in the footer via a plugin or widget. Aim for clear category divisions and an easy-to-read layout so it becomes a signpost when users get lost.

Points to Note When Creating a Sitemap

When creating and operating a sitemap, keep the following points in mind. First, limit the URLs listed in your XML sitemap to the canonical pages you want shown in search results. Including noindex pages, duplicate pages, or redirect-destination URLs conveys incorrect information to search engines.

Also, a sitemap isn't "create it and you're done"; it's important to keep its content up to date as pages are added or removed. Setting up a mechanism that can auto-update prevents update omissions. Note also that just because you've placed a sitemap doesn't mean every page will necessarily be indexed. A sitemap is ultimately a supporting role that helps crawling, and it functions alongside high-quality content and appropriate internal link design.

Summary: Prepare Two Types of Sitemap to Match Your Purpose

There are two types of sitemap—the XML sitemap for search engines and the HTML sitemap for users—and each has a different role. XML sitemaps promote crawling and indexing, while HTML sitemaps improve on-site navigation.

XML sitemaps can be created easily using automatic generation tools or CMS plugins, and after creation, it's important not to forget submitting to Search Console. For HTML sitemaps, organize the listing page with category divisions that keep users from getting lost. Prepare both to match their purposes, and aim for a site that's easy to understand for both search engines and users.

Related posts