I can confirm the same behavior on my site. I don’t know if it’s “normal” or not. On one hand, the terms are redundant, one only needs one or the other. OTOH, if the permastruct is set to have both, the redirect should have both IMO. In truth though, as long as the canonical link doesn’t change (it doesn’t), there is no ill effect from this as far as SEO is concerned.
I believe the behavior is managed by redirect_canonical(), which has a filter of the same name where one can alter default behavior if maintaining the ID is really important to you.
BTW, you should try to use a trailing slash in all WP permalinks. If you do not, WP will do an extra redirect in order to include it. You should want to avoid unnecessary redirects.
hi bcworkz,
Thanks for your reply
You are right about canonical links
About the importance of using ID in permalink, i think it is important in my case, because i have thousands of posts, some with near to similar titles and post id makes the url unique. Maybe i’m wrong !
First i was trying to use a combination of category id and post id like this: %category_id%-%post_id% but wp does not have category ID as an option, i have to add this via a function, i’m not yet ready to make this move.
Every post’s permalink slug has to be unique anyway. When you try to use an existing slug, WP will append a number to ensure it’s unique. Including the ID is redundant. You don’t really need a reason to want to include the ID, if it’s what you want, you should have it. That said, all the links within your site should already include the ID. It only gets dropped when someone manually types in an abbreviated permalink. If that’s bothersome, filter the “redirect_canonical” to ensure it’s always part of the URL.
Thank you @bcworkz for your time and help
I will do some tests