Support » Plugins and Hacks » Redirection » URL monitoring shouldn't add redirects for custom post types

URL monitoring shouldn't add redirects for custom post types

  • Hi guys,

    I recently uncovered a problem where Redirection with the URL monitoring option enabled will add redirects for custom post types.

    I found this out because it borked the redirection destination URL in a couple of these redirects on a WooCommerce install and as a result these product pages were redirecting to the home page.

    In the options it says for Post and Pages only, I think you might be missing some validations to check which post type it is before going ahead and putting in a redirect. I could imagine some other plugins creating custom post types would have issues with this as well.



Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author John Godley


    In what way is it wrong to redirect a custom post type? It seems to be a useful thing to do and core WP does this anyway.

    Hi John,

    The option specifically says Posts and Pages, so I wouldn’t expect it to do so for CPTs.

    Not all CPTs need Redirection to handle URL changes, but I guess that point is up for debate.

    Maybe it would be better to have the option to exclude/include custom post types and have Pages and Posts on by default?

    Also as far as I know core doesn’t manage 404s when slugs change.. can you expand?

    Hey again John,

    Just took a look through your changelog and it seems my problem was similar to the one fixed in 2.1.29

    Fix problem with custom post types auto-redirecting (click on ‘groups’ and then ‘modified posts’ and clear any entries for ‘/’ from your list)

    This is pretty much what happened, only I’m not on a version less than 2.1.29. This site was on 2.2.13 and only fairly recently re-launched with a fresh install.

    I can’t seem to reproduce the issue, so I’m not sure if it was a once off or not… sorry I can’t be more helpful!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘URL monitoring shouldn't add redirects for custom post types’ is closed to new replies.