Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Should we drop default lastmod of Time.now as Google says "it needs to consistently match reality"? #429

Open
valscion opened this issue Jun 28, 2023 · 2 comments

Comments

@valscion
Copy link

Source: https://developers.google.com/search/blog/2023/06/sitemaps-lastmod-ping#the-lastmod-element

The lastmod element

Over the years we've observed a varying level of usefulness of the lastmod element across the sites that provide it. This may have been the result of the kind of content that's published, or perhaps the content management system, but nowadays lastmod is indeed useful in many cases and we're using it as a signal for scheduling crawls to URLs that we previously discovered.

For the lastmod element to be useful, first it needs to be in a supported date format (which is documented on sitemaps.org); Search Console will tell you if it's not once you submit your sitemap. Second, it needs to consistently match reality: if your page changed 7 years ago, but you're telling us in the lastmod element that it changed yesterday, eventually we're not going to believe you anymore when it comes to the last modified date of your pages.

You can use a lastmod element for all the pages in your sitemap, or just the ones you're confident about. For instance, some site software may not be able to easily tell the last modification date of the homepage or a category page because it just aggregates the other pages on the site. In these cases it's fine to leave out lastmod for those pages.

And when we say "last modification", we actually mean "last significant modification". If your CMS changed an insignificant piece of text in the sidebar or footer, you don't have to update the lastmod value for that page. However if you changed the primary text, added or changed structured data, or updated some links, do update the lastmod value.

This seems to go counter to the default where if lastmod is not set when add is called, it uses Time.now:

sitemap_generator/README.md

Lines 693 to 699 in ed28e59

* `lastmod` - Default: `Time.now` (Integer, Time, Date, DateTime, String).
The date and time of last modification. Example:
```ruby
add content_path(content), :lastmod => content.updated_at
```

@valscion valscion changed the title Drop default lastmod of Time.now as Google says "it needs to consistently match reality" Should we drop default lastmod of Time.now as Google says "it needs to consistently match reality"? Jun 28, 2023
@dogweather
Copy link

Fascinating, and great catch.

@Willardgmoore
Copy link

Willardgmoore commented Sep 27, 2023

I just saw the commit to remove pinging bing when there is an update. I see on bing's website something about submitting a URL through the API. Is that becoming the standard, or what should the process be going forward for the rest of us non-SEO guys that just follow the directions from tools like this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants