WordPress.org

Making WordPress.org

Opened 2 months ago

Closed 8 weeks ago

#5169 closed defect (fixed)

Requests to paginated homepage URLs with 'order' params should return a 404

Reported by: jonoaldersonwp Owned by:
Milestone: Priority: normal
Component: General Keywords: seo
Cc:

Description

On wordpress.org, requests to wordpress.org/page/n/ (where 'n' is a number) - as well as requests followed by arbitrary queries (e.g., https://wordpress.org/page/2/?order=cats) - return a 404 status and template. This is the correct behaviour.

On Rosetta sites, however, this is not the case.
URLs like https://fr,wordpress.org/page/2/?order=cats and https://ja.wordpress.org/page/13/?field_department_tid=All&order=title&sort=asc&qt-product_tos_download_new=1&15fca476=707a3199&version=subscription&Tablet&gclid=EAIaIQobChMI_KPyi8DG3QIViOFRCh39PgwtEAAYASABEgK7OPD_BwE&type=navmenu&mkt_tok=eyJpIjoiTlRnMVpEY3lZMlV4WlRneSIsInQiOiJzUHQwMjlPVTFFU1diWHA0dW1jVVR1SG5TREpUSElWR0lzMDRoQmJvdFVHSjlmQWg4SUprXC9Cd3E4MzhGdDdMMlwvQ2F3K3J6QmUrMDBFQ3R0UzlLSm9FQ2pzZ1wvMk16VnVpdkhNTmthSE1vS2JDVEhocU55M2RUT0tQZUNQbDZwQSJ9 (note the presence of the order parameter) return the news template.

In these cases, the Rosetta sites should behave in the same way as the main site.

Change History (7)

#1 @ocean90
2 months ago

  • Component changed from International Sites (Rosetta) to General
  • Priority changed from high to normal

The main site has no published posts so you have to compare it with https://wordpress.org/news/page/2/?order=cats or https://make.wordpress.org/core/page/2/?order=cats.

#2 @jonoaldersonwp
2 months ago

I'm not sure that's relevant; historically, these types of request to the main site returned results from the news section, until this was addressed.

#3 @Otto42
2 months ago

To simply and remove all the nonsense parameters there.

https://ja.wordpress.org/page/13/?order=title&sort=asc

https://ja.wordpress.org/news/page/13/

Those return the same things.

#4 @bradleyt
2 months ago

Its worth noting that the issue @jonoaldersonwp has identified is WordPress core behaviour, which can be seen on multiple WordPress sites:

https://central.wordcamp.org/?order=cats
https://wordpress.org/news/?order=asc
https://yoast.com/?order=cats

(Note the Yoast example serves a different canonical for the ?order= page, whereas core serves no canonical for the ?order= pages).

As this is long-established core functionality (and therefore unlikely to change in core for the short-term, if ever), but given that this is an SEO issue on the Rosetta sites, I would like to suggest that the quickest, easiest may be to redirect the problematic requests. Do any legitimate users use the order/ orderby params? Could these requests be redirected to the same URL without those params? (the redirect target would then either show the intended page, or a 404 in the case of the https://fr.wordpress.org/page/2/?order=cats example)

#5 @jonoaldersonwp
2 months ago

Ah, that's... interesting! Hadn't realised that's core.

I'm nervous about using interstitial redirects to remove parameters; that'll compound some other issues that we have. It also won't solve the underlying/root issue I'm trying to address, which is arbitrary+duplicate URLs being indexed with tracking parameters (compounded in turn due to a lack of canonical URL tags).

Worth noting that this ticket - https://meta.trac.wordpress.org/ticket/4331 - will address the underlying problem without having to fight with redirecting 'out' any legitimate query params.

If that's still stalled, then, I'd be keen to proceed with the redirect approach as preferable to nothing!

#6 @dd32
8 weeks ago

In 9872:

SEO: Canonical: Only include the order param if it's a valid sort value.

See #5173, #5169.

#7 @dd32
8 weeks ago

  • Resolution set to fixed
  • Status changed from new to closed

I'm not seeing anything actionable here.

The pages will include a canonical tag usually now, which should deal with junk query vars.

Note: See TracTickets for help on using tickets.