A sitemap is a document that lists the pages of a website so that search engines and users can find them. In SEO, it is a direct line of communication with crawlers: instead of waiting for the robot to discover content by following hyperlinks, the site explicitly declares which URLs exist and which ones deserve to be indexed. It is a text or markup file, published at an accessible path, that does not change how pages look but makes them easier to find.
There are several formats and several levels of sitemap. The best known is the XML file intended for search engines, while the HTML page meant for visitors remains a complementary navigation element. There is also a plain text format, useful for very long lists. Understanding the difference between these tools is essential so you do not confuse the user-orientation function with automatic indexing, which follows separate technical logic.
What a sitemap is really for
A sitemap is a structured list of web addresses belonging to the same domain. Its main function is to help search engines discover pages, especially when the site is new, very large or poorly internally linked. It does not guarantee indexing, but it increases the chance that a piece of content is found and evaluated.
The XML format for search engines
XML is the standard format for search engines, defined by the sitemaps.org protocol. Each URL is wrapped in an element with the address and, optionally, the last modification date (lastmod). The protocol also includes priority and update frequency, but Google ignores them and uses lastmod only if it is reliable. The file is usually placed in the root directory of the domain.
The HTML sitemap for people browsing
An HTML sitemap is a visible page of the site that collects links to the main sections. It is mainly for users, offering an alternative path when navigation is unclear. For search engines it has secondary value, but it helps distribute so-called link equity within the domain.
Available formats and rules to follow
Besides the two main formats, there is the plain text file, which contains one URL per line. It is a solution used when simplicity outweighs the need for metadata. Regardless of format, a sitemap must follow some rules: use absolute URLs, correctly encode special characters and stay within the limits of 50,000 URLs and 50 MB uncompressed per file, beyond which you need to split the list into multiple files and coordinate them with an index.
The XML structure has a root element containing one or more url elements, each referring to a single address. The only metadata Google uses is the last modification date, and only if it is accurate. Priority and update frequency are part of the protocol but are ignored.
XML sitemap vs HTML sitemap: the differences
| Aspect | XML sitemap | HTML sitemap |
|---|---|---|
| Main audience | Search engines | Site visitors |
| Typical location | File in the domain root | Page linked from the footer or menu |
| Available metadata | Last modification date (priority and frequency are ignored by Google) | None |
| Impact on indexing | Helps discover URLs | Indirect, through links |
| URL limit per file | 50,000 URLs or 50 MB uncompressed; beyond that, use an index | Variable, tied to readability |
The steps to create and publish it
- List all the canonical URLs you want to make known, excluding duplicates and unnecessary parameters.
- Choose the most suitable format: XML for search engines, HTML for users, plain text for long lists.
- Generate the file following the syntax of the chosen format, with absolute URLs and encoded characters.
- Upload the document to the domain root or to a stable, accessible path.
- Point to the file’s location with the Sitemap line in robots.txt.
- Submit the sitemap in Search Console (and in Bing Webmaster Tools).
- Regularly check that the listed URLs return correct status codes and not errors.
- Update the file whenever relevant pages are added, changed or removed.
Mistakes to avoid and best practices
A common mistake is to include blocked, redirected or duplicate pages in the sitemap, which dilutes the signal and confuses crawlers. Equally common is wasting time on priority and frequency, which Google ignores: what counts is the last modification date, if it is accurate. Finally, many sites publish the sitemap and then forget about it: a file that is not updated quickly loses its usefulness.
Best practices include consistency with canonical URLs, excluding pages not meant for indexing and checking regularly with diagnostic tools. A sitemap does not replace good internal linking architecture, but complements it. A well-structured site gains an incremental advantage from a sitemap, not a remedy for navigation problems.
Frequently asked questions
Does a sitemap guarantee that pages are indexed?
No. A sitemap signals that URLs exist, but the decision to index depends on the search engines’ own evaluation, which considers the quality, uniqueness and usefulness of the content.
Where should an XML sitemap be placed?
In the domain root, for example /sitemap.xml, or at a stable path. Its location can be indicated with the Sitemap line in robots.txt and submitted in Search Console.
What is the difference between an XML sitemap and an HTML sitemap?
The first is intended for search engines and contains metadata; the second is a page for visitors that collects links to the main sections of the site.
How many URLs can a single file contain?
Each file can contain at most 50,000 URLs and weigh at most 50 MB uncompressed. Beyond these limits, the list is split into multiple files linked by an index.
Does a small site need a sitemap?
It is not mandatory, but it can help speed up page discovery, especially in the first months of a site’s life or after a restructuring.
How often should a sitemap be updated?
Whenever relevant pages are published, changed or deleted. Regular updates keep the file consistent with the actual state of the site.
From the glossary to the projectWant to know if your site has technical issues holding back its visibility?The technical SEO audit analyzes the site to identify errors and ranking opportunities on Google and delivers a prioritized list of actions.Discover the technical SEO audit
Related entries:
What is a sitemap SEO sitemap Sitemaps Create XML sitemap XML sitemap
