WordPress.org

Making WordPress.org

Opened 2 months ago

Last modified 4 weeks ago

#5241 new defect

Soft 404s with order params

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

Description

On sites with no blogs, the order/ orderby params can cause soft 404's (404 template returned with 200 status code).

For example:
https://wordpress.org/?order=asc
https://wordpress.org/?orderby=example
https://wordpress.org/five-for-the-future/?order=asc
https://wordpress.org/support/?order=asc
https://developer.wordpress.org/?order=asc

Other examples no doubt exist.

These should all return the correct HTTP status code.

Change History (1)

#1 @dd32
4 weeks ago

It looks like this is some 'buggy' WordPress Core behaviour.

https://core.trac.wordpress.org/browser/trunk/src/wp-includes/class-wp.php?rev=48121&marks=716,718,722,728#L698

These requests are all to sites with a page set as the front page, and WordPress doesn't hard-404 for matching a matching archive (Even if it has no posts).
In these cases, WordPress is treating the page as a homepage archive (ie. posts on front) where it should be treating it as a 404 (page on front is not an archive).

I haven't gone digging for a core ticket for this yet

Note: See TracTickets for help on using tickets.