XML sitemap files are specified at sitemaps.org. The description for urlset > url > lastmod saysThe date of last modification of the file. This date should be in W3C Datetime format. This format allows you to omit the time portion, if desired, and use YYYY-MM-DD.Note that this tag is separate from the If-Modified-Since (304) header the server can return, and search engines may use the information from both sources differently.I find this confusing. The term file is used exclusively to refer to the XML sitemap.xml (or to files that make up the sitemapindex). Why is this part of the url tag then? The value can't possibly be different for two urls in the same XML file. Also, If-Modified-Since is a request header and would never be returned by an RFC compliant web server. In contrast, the description for sitemapindex > sitemap > lastmod is quite clear and makes sense (note the use of the term file):Identifies the time that the corresponding Sitemap file was modified. It does not correspond to the time that any of the pages listed in that Sitemap were changed.Is this the canonical specification for XML sitemaps? Is there a newer, revised version? Or is there some authoritative clarification, preferably from Google?
What does url > lastmod in a sitemap really mean?
xml sitemap
I just stumbled across Google's Best practices for XML sitemaps & RSS/Atom feeds, which describes lastmod as follows:The last modification time should be the last time the content of the page changed meaningfully. If a change is meant to be visible in the search results, then the last modification time should be the time of this change.Interestingly, this document contradicts the specification at sitemaps.org by saying that the maximum uncompressed size for a single file is 10 MB, not 50 MB. What a mess.