wordpress-seo
wordpress-seo copied to clipboard
Wrong last modified date time in sitemap index
What did you expect to happen?
That the last modified date in the sitemap would reflect the last modified date of the posts/pages in that specific sitemap (discussed with SEO team, also their expectation of the workings of the sitemap dates). No caching used.
What happened instead?
The dates are not always the same.
How can we reproduce this behavior?
- Set the max entries per sitemap to something low, like 2-5
- Check the last modified dates for the sitemap
- Notice the inconsistencies with the last modified dates, like in the following images:
Sitemap:
Post-sitemap8:
Sitemap:
Post-sitemap15:
User example with 18.000 posts and sitemap set to max 500 entries:
Sitemap:
Post-sitemap7:
Technical info
- WordPress version: 4.7.5
- Yoast SEO version: 4.8
Please inform the customer of conversation # 197055 when this conversation has been closed.
Some further testing:
1.Edit a post within a category. In the example below, I edited the post on July 4th, 2017
2.The category sitemap (in this example the coupon-sitemap) changed to reflect the current last modified date of that updated post
3.The main sitemap did not. In fact, in some testing the coupon-sitemap changed while in others the store-sitemap changed
NOTES: -Was not able to reproduce issue on my staging site with either WordPress' native category taxonomy set-up OR with a custom taxonomy such as the one's that can be created with a custom post type plugin. -User has 1000 in the sitemap to be displayed -User is updated with Yoast (4.9) but on WordPress 4.7.5 -User reported Back in Feb 2017, " It was working correctly up until around 3 months back from now." At that time user was on WordPress 4.7.2. -User reports "This date issue DO NOT happen with normal pages on our site and they reflect correct date in the sitemap."
More Notes: Last moddate in sitemaps may be ignored by Google: https://www.seroundtable.com/google-sitemap-priority-field-a-bag-of-noise-23645.html
Please inform the customer of conversation # 180345 when this conversation has been closed.
Please inform the customer of conversation # 209099 when this conversation has been closed.
Please inform the customer of conversation # 415752 when this conversation has been closed.
Taxonomy sitemap last mod date is missing in the sitemap on parent taxonomies that only have posts in it's child taxonomies.
Result is, in Google's new search console:
Index coverage: Indexed, not submitted in sitemap
Discovery:
Sitemaps: N/A
Is the above an issue?
- If we manually add a post to the parent taxonomy, the sitemap now displays a lastmod date of the post as expected.
- Outputting last mod date in a parent tax archive using
get_the_modified_date( $d, $post )
with only posts in the child taxonomies, does seem to output the correct last mod date (of the latest post in any child taxonomy). - Seems we are struggling to be indexed quickly and not ranking so well on these parent taxonomies - (needs more investigation), whilst child taxonomies seem to be doing better.
The big issue for us is that posts are created via the API via a CRM. (jobPostings) and therefore it's not possible to add posts to the parent taxonomies as a quick fix.
Any help fixing this would be super appreciated!
Cheers, Ben
I see the same issue, but on my setup (WordPress 4.9.8 multisite, PHP 7.2.10) the first sitemap mod date never changes from its really old 2014 date no matter what I do. Updating a post within the first sitemap seems to move the post to the second sitemap and update the mod date for the second sitemap only.
Issue is related to having multiple sitemaps.
1. Have multiple sitemaps for a content type like posts
Many Post sitemaps
Notice /daily-candy-feature/ Last Mod Time as it appears in the Post-sitemap1.xml
2. Update the post
3. See the most recent numerical sitemap gets the Last Mod updated but the one where the post was originally stayed the same
4. Visit post sitemaps and see the post was moved to the most recent one
Post-sitemap1.xml no longer has the post
Post-sitemap4 does
Tech Specs WordPress: 5.2.2 Yoast: v11.6 (free or prem)
Please inform the customer of conversation # 519931 when this conversation has been closed.
I can confirm that this issue is still there.
Basically also using filter to change the numbers of max entries the problem persist. It is like that yoast cache those values and also on generating new sitemaps that existed before it used that date. This happens only on the multiple files for the same post type.
Having a similar issue On a taxonomy page a when a post type is sent to draft, the modified date doesn't update Because from what I believe is the way it works :
For the sitemap we try to fetch the last modified post date from a post within that taxonomy to let Google know there is a change on that page.
So because an older post is on there then it doesn't update the sitemap date so Google still has the old content in the description
So I have to update a post type that is in that taxonomy that is published so that it no longer has an old date
It needs to make sure that when a post is changed to draft then (or post_status changes) then it recognises that fact and updates accordingly
Please inform the customer of conversation # 1037430 when this conversation has been closed.
Please inform the customer of conversation # 1120544 when this conversation has been closed.
Related issue: https://github.com/Yoast/wordpress-seo/issues/15801
Please inform the customer of conversation # 1144640 when this conversation has been closed.
Please inform the customer of conversation # 1147078 when this conversation has been closed.