I am trying to create sitemaps for a very large multilingual website; means that every single URL is duplicated with as many languages there are; however the more pressing issue is that content is incredibly dynamic, the lastmod tag can be easily obtained.

The sitemap is composed as follows, each index contains and specifies every sitemap under it.


If I create each collection point based on creation, the point is added, and hence a lastmod tag cannot be added or otherwise known other than by fetching the resource via a HEAD request and reading the header.

If I create each collection point based on modification, the point is added if it was modified during the day, and as so there will be duplicates entries between points with different lastmod dates, any data that changes; since it's impossible to modify already stored collection points as it will require intensive reads to modify data in older collection points.


The only fields that are useful to include in your sitemap are the <loc> and <xhtml:link rel="alternate" hreflang="en">. You can omit the <lastmod>, <priority> and other fields. Google doesn't use them.

Google's Gary Illyes (methode) says:

The lastmod tag is optional in sitmaps and in most of the cases it's ignored by search engines, because webmasters are doing a horrible job keeping it accurate.

If the lastmod is going to be expensive to compute and keep up to date, just don't put it in. I usually don't put those fields in because they take up a lot of bytes and really bloat sitemaps for no gain.

  • Read that a couple of times, still found it hard to believe; but alright so I guess that makes me take the path of having clean sitemaps without duplication, aka, I am able to query the database, my main source of truth, for newly added records since last check that correlate to pages, and just omit the modification since lastmod is unecessary that way updates of the old values are unnecessary and the sitemap only grows. I guess that's the best course of action.
    – Onza
    Jul 5 '20 at 9:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.