Opened 4 years ago

Closed 4 years ago

#5169 closed defect (bug) (fixed)

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

Reported by: jonoaldersonwp's profile jonoaldersonwp Owned by:
Milestone: Priority: normal
Component: General Keywords: seo


On, requests to (where 'n' is a number) - as well as requests followed by arbitrary queries (e.g., - return a 404 status and template. This is the correct behaviour.

On Rosetta sites, however, this is not the case.
URLs like https://fr, and (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
4 years 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 or

#2 @jonoaldersonwp
4 years 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
4 years ago

To simply and remove all the nonsense parameters there.

Those return the same things.

#4 @bradleyt
4 years ago

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

(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 example)

#5 @jonoaldersonwp
4 years 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 - - 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
4 years ago

In 9872:

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

See #5173, #5169.

#7 @dd32
4 years 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.