wordpress-seo icon indicating copy to clipboard operation
wordpress-seo copied to clipboard

Yoast Post Sitemap not sorted descending by modified time

Open BradFD opened this issue 6 years ago • 18 comments

  • [x] I've read and understood the contribution guidelines.
  • [x] I've searched for any related issues and avoided creating a duplicate issue.

Please give us a description of what happened.

Post sitemaps are sorted oldest modified date first then newest when it should be the reverse with newest modified posts appearing first in the post sitemap. This is with current 12.5 plugin

I have checked multiple sites under my control and they all show this sorting behavior in the post sitemap. See below

Current Sorting of Post Sitemap Example:

  1. Homepage (modified recently)
  2. Old post (ex 2013 modified date)
  3. Old Post (ex 2014 modified date) 4 Old Post (ex 2015 modified date) and so on to: 1000. New Post (modified yesterday)

Please describe what you expected to happen and why.

I expect most recently modified posts to appear first in the sitemap and descend from there. Expected Sorting of Post Sitemap Example.

  1. Homepage (modified recently)
  2. Newest Post (modified today)
  3. Next Newest modified Post (modified yesterday)
  4. Next Next Newest modified Post (modified 3 days ago)
  5. etc and so on to: 1000. Oldest modified (ex 2014 modified date, years ago)

How can we reproduce this behavior?

  1. Load post sitemap
  2. See homepage as first entry
  3. See oldest modified dates second and then ascending to the most recently modified post appearing last in the sitemap.

Technical info

  • WordPress version: 5.3
  • Yoast SEO version: 12.5

BradFD avatar Nov 22 '19 16:11 BradFD

Hi @BradFD , this should not make a difference, SEO-wise. Why would you like to see this?

Djennez avatar Nov 25 '19 08:11 Djennez

Sorting by modified date with most recent date first ensures optimized use of crawl budget. Additionally, in the "multiple URL" example shown in the specification document at https://www.sitemaps.org/protocol.html#sitemapXMLExample the example shows entries appearing sorted by the most recent modified date to the oldest modified date. Logically, this is also the way to do.

BradFD avatar Nov 25 '19 22:11 BradFD

@jono-alderson I contacted you about this yesterday, would you mind having a look and seeing if this is a valid feature request?

Djennez avatar Nov 26 '19 09:11 Djennez

I don't think that the ordering is particularly important as far as Google is concerned (unless you have an enormous site, crawl budget for XML sitemaps shouldn't be a concern - they're not crawled/consumed/processed in the same way/system as conventional URLS/pages).

However, generally, I think that sorting by last modified date would make sense as a default.

Buuuut, I think this needs some scoping. I'm thinking it through, and there are some grey areas. E.g.,

  • Homepages and 'special pages' (blog home, store home, etc) should always be listed first.
  • In the case of pages, we should order by the order parameter (as/and, the lastmod date of a page is less significant than that of a post).

More generally, If I make a minor alteration to a legacy post, should that catapult it to the top of the list? That feels awkward.

Up for discussion!

jonoalderson avatar Nov 26 '19 09:11 jonoalderson

Hi My 5 cts. I think is a reasonable feature. When the OP say crawl budget, I think is not about crawl the xml files but to urls from the site, i will say, if you have and old site with 1000 url´s you may expect that not all the url be crawled, so the user may will that the newest url be crawled/indexed first, before the older content. In other hand, if you modify and older post, changed their content, you may will that these renewed post be crawled before the unchanged older post. About special pages, all most the blog home is allways the 1st. cause in the functions that put the url in sitemap first is calculated the home and then the post/pages. maybe others stuff like store home need some modifications. But all this maybe solved with a check in settings and let the user choose wath the order for sitemaps is.

Lofesa avatar Dec 02 '19 10:12 Lofesa

I also think is a good feature. Any update yet?

adidoro avatar Oct 22 '20 12:10 adidoro

This is a must-have feature for us. Any update on this?

saqib-ahmed avatar Mar 09 '21 16:03 saqib-ahmed

Google uses the first few elements as the "site links" under the main page search result. So, yes it absolutely matters what order the posts are in. Also, logically, the most recently modified post should be at the top of the list, since it has the most recent content, and should be indexed first, not last.

mbenedek avatar Apr 30 '22 10:04 mbenedek

Google uses the first few elements as the "site links" under the main page search result. So, yes it absolutely matters what order the posts are in. Also, logically, the most recently modified post should be at the top of the list, since it has the most recent content, and should be indexed first, not last.

There's no relationship between XML sitemaps (their order, or their contents), and the choice/presentation of site links - other than facilitating their discovery.

However, I do still agree that ordering by last modified (with some exceptions / special cases for the homepage, etc) is a better default; I'll make sure this is still on our radar internally.

jonoalderson avatar May 02 '22 07:05 jonoalderson

Please inform the customer of conversation # 1054950 when this conversation has been closed.

shabnam611 avatar Sep 13 '23 07:09 shabnam611

@Djennez any news on this feature request?

manuelRod avatar Dec 04 '23 15:12 manuelRod

we are interested too

WpSEOit avatar Dec 25 '23 13:12 WpSEOit

We need this Feature Please!

jsayubi avatar Jan 05 '24 08:01 jsayubi

Please inform the customer of conversation # 1103732 when this conversation has been closed.

Yvonne-Palanca avatar Feb 10 '24 09:02 Yvonne-Palanca

+1

StueberMa avatar Jun 01 '24 17:06 StueberMa