Make WordPress Core

Opened 5 weeks ago

Last modified 3 weeks ago

#65163 new defect (bug)

Force URLs/URIs of Posts and Feeds to Redirect (301) to All Lowercase

Reported by: chiarella86's profile chiarella86 Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version:
Component: Canonical Keywords:
Focuses: Cc:

Description (last modified by sabernhardt)

Two problems exist with the current WordPress setup:

  1. An otherwise correct write-up of an RSS feed that has some uppercase letters will result in a 404. This is very bad for user experience. I can set up redirects to ignore casing for the “wrong” version for the redirect (so that /feed/, /FEED/, /Feed/, and /fEed can go to /feed1), but if I have a redirect that ignores casing on /feed and redirects to /feed or make a redirect that ignores casing and trailing slash for /feed or /feed/ that redirects to /feed, then I have created a loop. An infinite loop creates breakage because “Ignore Case” will also redirect the correct version to itself, and then again to itself, and yet again, ad infinitum.

    I have no way to redirect all instances except the correct one. I can only redirect URLs/URIs that have right or wrong casing *and also* the wrong presence or absence of a trailing slash.

  2. All posts, regular posts, create duplicates with the wrong case. This means that https://www.example.com/bar and https://www.example.com/Bar both exist, and that destroys page ranking. Incorrect absence of a trailing slash will 301 to the other version, but it will not fix the casing. If the presence or absence of a trailing slash is right, then nothing happens not all. The URL/URI goes through and the page loads a duplicate of the canonical version.

Hence, the site should force lowercase on everything (both feeds and posts, as well as pages).

I would even say it is good universally if the user knows that all media library assets must be in lowercase. (In a more complicated way, WordPress would have to rename all previously uploaded files and check for conflicts before flipping a mandatory switch, but that solution is a major request.)

Thank you for your time.

1 By the way, I set up permalinks etc. to not add a trailing slash. Also, I prefer the slash-less version of the feed(s), and WordPress makes both version anyway, and so I set up redirects there in any case, with the Redirection plugin from John Godley.

Change History (2)

#1 @sabernhardt
5 weeks ago

  • Description modified (diff)

#2 @westonruter
3 weeks ago

  • Component changed from General to Canonical
  • Version 6.9.4 deleted
Note: See TracTickets for help on using tickets.