A sitemap is a special page with data that helps search engines manage site indexing and users to navigate through the main pages, sections, and categories of the site. Simply put, a sitemap contains the URLs of the most important pages of your site. It helps users and search engines to understand the complex structure of sites, such as an online store with many pages. People need a sitemap to quickly access the necessary point on the site, and search engines need it to understand which pages to index. There are two main types of sitemap that have the same name but different formats — HTML and XML.
Sitemap.xml is a file placed in the site's directory and designed for search engines. It contains links that should be indexed and stores information about when they were last updated. You can add up to 50,000 items to the file, and its size should not exceed 10 megabytes. Sitemap.xml can be created for images, videos, and multilingual pages. In sitemap.xml, you can specify the frequency of page updates and their priority compared to other pages. This does not mean that the robot will only check the specified pages when you said so. Frequency indicators serve as a recommendation, and the final decision remains with the search engine.
Sitemap.html is a page that contains links to the main sections of the website in a hierarchical structure. Sitemap.html is intended for users and serves a navigational role. If you compare a website to a book, the sitemap would be its table of contents, it will help you study the structure and open the desired section. This page is useful for SEO promotion because, unlike XML maps, it shows search engines only the most important pages of the site. Thanks to this, they will be scanned faster.
The sitemap consists of tags that perform various functions:
- <urlset> — combines all page addresses;
- <url> — contains information about a specific URL;
- <loc> — a tag under which the URL is written;
- <lastmod> — determines the date and time of the last page update;
- <changefreq> — indicates the frequency of page updates, with values of: always, hourly, daily, weekly, monthly, yearly, never;
- <priority> — sets the priority of the page in the range from 0.1 to 1.
There are several ways to create a sitemap.
- Install a sitemap generator program. They are mostly paid, but there are also free options. The programs will help generate the required format sitemap.
- Use an online generator. It works on the same principle as the programs.
- Automatic generation. Depends on the capabilities of the platform.