How do sitemap attributes like lastmod, changefreq, and priority work?
guide // , 5 min read, by Darthwares
Sitemap attributes such as `lastmod`, `changefreq`, and `priority` provide search engines with hints about the pages on your website. These optional XML tags offer information about when a page was last updated, how often it is expected to change, and its relative importance within your site. While these attributes aim to help search engines crawl your site more efficiently, their interpretation and impact can vary across different search engines.
On this page // 6 sections
The short version
- Sitemap attributes provide search engines with hints about your site's content.
- The `lastmod` attribute signals the last update date of a page, which Bing uses to prioritize recrawling.
- The `changefreq` and `priority` attributes are general hints that may not directly influence crawling frequency or ranking.
- Bing ignores `changefreq` and `priority` attributes entirely.
- Always ensure `lastmod` reflects the actual page update date, not just the sitemap generation date.
What is a sitemap, and what are its main attributes?
A sitemap is an XML file that provides information about the pages, videos, and other files on your site, as well as the relationships between them. This file is structured using XML tags, which search engines like Google read to crawl your site more efficiently. Bing also recommends submitting XML sitemaps following the Sitemap specification to help ensure full site discovery and indexing coverage.
Sitemaps tell search engines which pages and files you consider important on your site. They also provide valuable information about these files, such as when a page was last updated or if there are alternate language versions. While a sitemap helps search engines discover URLs, it does not guarantee that all items listed will be crawled and indexed.
Sitemaps can significantly improve the crawling of larger or more complex sites. They are particularly helpful for sites with a lot of rich media content, such as videos and images, or for sites that are shown in Google News. Sitemaps assist Google in finding and understanding these specialized files and news articles on your site.
Within a sitemap, there are several optional attributes that provide additional hints to search engines. These include `lastmod`, which indicates the date of last modification for a page; `changefreq`, which suggests how frequently a page is likely to change; and `priority`, which signals the relative importance of a URL compared to others on your site.
How does the lastmod attribute work?
The `lastmod` attribute is an optional tag within a sitemap that specifies the date a page was last modified. It is crucial that this date reflects when the linked page itself was last updated, not merely when the sitemap was generated. Bing specifically advises against setting `lastmod` to the sitemap generation time unless the content on that URL was actually updated.
Bing considers the `lastmod` field in your sitemap a key signal. It helps Bing prioritize URLs for recrawling and reindexing, or to skip them entirely if the content has not changed since the last crawl. This attribute provides valuable information about the freshness of your content.
Bing recommends using standard ISO 8601 date formatting for `lastmod` values, including both the date and time, to ensure your signals are interpreted correctly. Including a timestamp offers a more precise signal of when content was updated, which helps Bing prioritize crawling activity more efficiently, especially for frequently updated or time-sensitive pages.
What does changefreq tell search engines?
The `changefreq` attribute is an optional sitemap tag that indicates how frequently a page is likely to change. This value provides general information to search engines. However, it is considered a hint rather than a command, and it may not correlate exactly to how often search engines actually crawl the page.
It is important to note that not all search engines use this attribute. Bing, for example, explicitly states that optional sitemap tags like `changefreq` are ignored and do not influence how your content is crawled or ranked.
How is the priority attribute used?
The `priority` attribute is another optional sitemap tag that indicates the priority of a specific URL relative to other URLs on your site. This value helps search engines understand which pages you deem most important for their crawlers. However, this value does not affect how your pages are compared to pages on other sites; its scope is limited to your own domain.
Assigning a high priority to all URLs on your site is not likely to be helpful, as the attribute is designed to highlight relative importance. Similar to `changefreq`, Bing ignores the `priority` tag, meaning it does not influence how your content is crawled or ranked by Bing.
Do sitemap attributes guarantee crawling or indexing?
While sitemaps and their attributes help search engines discover URLs on your site and provide valuable information, they do not guarantee that all the items in your sitemap will be crawled and indexed. Sitemaps serve as a foundational signal for ensuring comprehensive URL coverage across your site.
Even with real-time URL submission protocols, sitemaps remain an important tool for content discovery. Once your sitemap is referenced in your robots.txt file or submitted through Bing Webmaster Tools, Bing will attempt to fetch it immediately upon submission. This process helps Bing understand your site's structure and content, even if it doesn't assure indexing for every page.
Common questions
What is the purpose of a sitemap?
A sitemap is an XML file that provides search engines with information about the pages, videos, and other files on your site, including their relationships. Search engines read this file to crawl your site more efficiently, helping them discover URLs and understand which pages you consider important.
Which sitemap attributes are most important for search engines?
The `lastmod` attribute is a key signal, especially for Bing, as it helps prioritize URLs for recrawling or skipping them if content hasn't changed. Optional tags like `changefreq` and `priority` provide general hints, but Bing ignores them and they do not influence crawling or ranking on that platform.
How should I format the lastmod date?
The `lastmod` date must be set to the date the linked page was last modified, not when the sitemap was generated. Bing recommends using standard ISO 8601 date formatting, including both the date and time, to ensure your signals are interpreted correctly. A timestamp provides a more precise signal, helping Bing prioritize crawling activity more efficiently, particularly for frequently updated pages.
Can sitemaps help with specific content types?
Yes, sitemaps can help search engines find and understand specialized files. For example, they are beneficial for sites with a lot of rich media content, such as video and image files, or for news articles. Sitemaps can improve the crawling of these more specialized files on your site.
Does a sitemap guarantee my pages will be indexed?
No, a sitemap helps search engines discover URLs on your site, but it does not guarantee that all the items in your sitemap will be crawled and indexed. It serves as a foundational signal to improve the efficiency of crawling, especially for larger or more complex sites.
Primary sources and further reading
This article was researched and written by an AI model and published automatically. It was written from sentences that were checked to appear on the pages below, but a person has not reviewed the text. If something is wrong, tell us at chibivikramathithan@darthwares.com and we will correct it.