Add and automatically update <lastmod> tag in sitemap

Hi Guys,

Is there any possibility to add a tag to my sitemap and automatically update it every time I publish my site?

We are planning to make a blog, so I don’t really want to edit the the sitemap every time manually.

I’m willing to consider any possibility: integrations, plugins, custom code… Any option to automate this process

Thank’s

There is no built-in way to do that.
You have two challenges to conquer;

  1. Generating the entire sitemap automatically, with all of your CMS content, plus the lastMod date, exactly the way your want.
  2. Overriding the built-in /sitemap.xml, automatically

#1 could possibly be done with some external programs hitting your API, with an identified date field to use as lastMod. Your static pages don’t have a lastmod that you can easily use, but you could possibly use the “last full published” date, or better just leave it blank.

Unfortunately there is no way to automatically update the custom sitemap.xml content for your site via the API.

#2 MIGHT work if you host that sitemap.xml file elsewhere, and then setup a 301 redirect from your webflow site. You MAY need that hosted sitemap.xml to be on a subdomain, and you MAY need to define your google console property as a domain-based property, so that it will accept that subdomain redirect as vetted content.

Alternately you could solve #2 using a reverse proxy setup, but that’s a lot of programming for a sitemap.xml, probably more than you’ll do on the rest of your site combined.

And it may not add much value;

Thank you very much for your quick answer!

I’ll play around with it

Is there any news on this one?
I see one of the replies mention that Google mostly ignores, but in contrary; Bing doesn’t.
Ref: The Importance of Setting the "lastmod" Tag in Your Sitemap | Webmaster Blog

Apparently, having this is much better than not having at all. Does webflow have any plans to include this for autogenerated sitemaps? How do we add to the feature wish-list?

Here’s a wishlist item you can upvote-

https://wishlist.webflow.com/ideas/WEBFLOW-I-1392