Lastmod for sitemap index entries?
See original GitHub issueIs it possible to add a lastmod
property for entries in a sitemap index?
I currently have code like this to create the sitemap index XML string:
// create the xml to be used for the sitemap-index by giving it an array of urls
const sitemapIndexXML = pd.xml(sitemap.buildSitemapIndex({
urls: fileNameArray.map((fileName) => `${baseUrl}/${fileName}`)
}));
Is there any way get the generated sitemap index to have a <lastmod>
element, similar to how the module allows you to pass a lastmodISO
property when creating a sitemap?
Ideally it would produce XML like this:
<sitemap>
<loc>http://example.com/sitemap-us.xml</loc>
<lastmod>2016-11-22T18:06:38.207Z</lastmod>
</sitemap>
<sitemap>
<loc>http://example.com/sitemap-ca.xml</loc>
<lastmod>2016-11-22T18:06:38.207Z</lastmod>
</sitemap>
Issue Analytics
- State:
- Created 7 years ago
- Reactions:5
- Comments:6 (1 by maintainers)
Top Results From Across the Web
Protocol - sitemaps.org
Sitemap Index XML Tag Definitions ; <lastmod>, optional. Identifies the time that the corresponding Sitemap file was modified. It does not ...
Read more >XML Sitemap: the ultimate reference guide | ContentKing
An XML Sitemap is a special document which lists all pages on a website to provide search engines with an overview of all...
Read more >Manage Large Or Multiple Sitemaps | Google Search Central
You can submit multiple sitemaps at once with a sitemaps index file. Learn how to manage large sitemaps or sitemaps for multiple sites....
Read more >When should I update lastmod value in the sitemap?
(For my wordpress site with over 10,000 indexed URLs, I am upating lastmod only for major updates and not for minor ones like...
Read more >XML Sitemap: Ultimate Guideline for SEOs
lastmod shows when the URL was last changed. In our example, it was on January 1st, 2005. With this entry, the search engine...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@ekalinin can we introduce this feature?
According to sitemaps protocal there’s an optional
lastmod
attribute which can be given to each sitemap in a sitemap index.lastmod
This is supported now, sitemap.buildSitemapIndex({urls:[{url: ‘http…’, lastmod: ‘2016-11-22T18:06:38.207Z’}]})