It seems that many Wordpress users, even very experienced ones, aren't aware that, in normal circumstances, with pretty permalinks enabled, an inexactly written or superficially non-matching URL will still often find its intended target.

So, first, here's the short version of my question:

A site operator concerned about SEO, but interested in adding category organization, might be concerned about thousands of posts in his database losing SEO ranking, even if no (or few!) 404 errors are actually produced by the change. In other words, if they organize their posts in new categories siteurl/lmao/post-one, siteurl/lol/post-two, and so on, visitors typing the old, simpler address (siteurl/postname) will still be taken to their intended targets (the same post, but now at siteurl/category/subcategory/postname) most of the time. In such a case, will it be worth the effort to write hard one-to-one redirects from old address to new address - or will avoiding doing so cause other problems?


At Wordpress sites using pretty permalinks, a user typing or clicking siteurl/postname will usually be taken to siteurl/year/month/day/postname if permalinks are set the latter way. Similarly, a user typing siteurl/shortened-version will be taken to siteurl/shortened-version-plus-the-rest, and so on. However, if the shortened version corresponds to more than one postname - shortened-version-old and shortened-version-more-recent - then (usually or always or almost always? - I haven't done a lot of testing here) then .../shortened-version-old will be served, perhaps because matched first.

On the other hand, if the request contains too much additional specificity in the postname itself, the redirect will fail. So, siteurl/postname-panoony will NOT find siteurl/postname, even though siteurl/postname may find siteurl/postname-panoony or siteurl/panoony/postname.

I've also noted slightly different behavior at a couple of sites. At one, siteurl/lol/lmao/postname finds siteurl/postname, but at another, where a simpler non-exact match does work, so that siteurl/lol/postname does find siteurl/postname, the longer, more complicated version does not. (I suspect the latter discrepancy might have something to do with different permalinks settings and underlying re-write rules.)

It is my further impression or observation that these redirects to inexactly matching addresses absorb a little bit of time, in some cases more than in others, meaning that for some posts, at least, from a combined performance and SEO perspective, it might be worth writing a specific 301 redirect, but that in a very large site whose permalink structure had changed, it might not be worth the effort to encode hundreds or thousands of such redirects. I also wonder at what point the sheer number of such redirects might itself produce a performance hit.

What I'm also uncertain about, and site operators contemplating labor costs, will be most concerned about is whether any other SEO penalty or any other drawback would be encountered if we just depend on the partial matching logic at least for a vast majority of posts at a large site. I'm also wondering if someone can provide or point to a concise description of that logic. I seem to recall reading one somewhere years ago, but I haven't been able to find it again, and don't want to try to re-invent the wheel if it's out there and available.

  • This is an incomplete answer, so I'm going to post it as a comment. I have 2 concerns with using WordPress's inexact matching: 1. it performs poorly and can bog down larger sites and 2. It uses a 302 redirect which has SEO implications. – MikeNGarrett Mar 18 '19 at 20:17
  • Thanks @MikeNGarrett - you've already given me a very helpful clue, and made me feel a little guilt for not having done just a little more research before posting my question. I hope someone find it useful anyway. A few more comments like yours, and I might be able to write an answer myself! Of interest: moz.com/blog/… – CK MacLeod Mar 18 '19 at 20:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.