Redirect 600+ posts in a category

#639326
Viewing 9 replies - 1 through 9 (of 9 total)
  • Hello,

    Thank you for your query and we are so sorry about the trouble this must have caused.

    Unfortunately, our plugin doesn’t support redirecting URLs to their URL with category names.

    However, to include a category in a URL post, you should add the category variable tags to the permalink structure. Please head over to your WordPress Dashboard > Settings > Permalinks:

    Rank Math support

    Then, WordPress should be able to redirect the old format to the new one automatically.

    If for some reason WordPress wasn’t able to create a redirection, you may need to manually add them or use another plugin that supports it.

    Hope that helps and please do not hesitate to let us know if you need my assistance with anything else.

    Anonymous
    Rank Math free

    Thanks, one question. If I do that and then use the category term in the URL to bulk apply redirects and then remove those category terms in the permalink tool will the redirects I set up go away?

    Hello,

    I’m afraid I wasn’t able to fully understand your concern here but please let me know if I misunderstood.

    If your permalink structure is currently set to /%postname%/ and you include /%category%/ with it then in all of your URLs the /category-name/ will be included and there is a chance WordPress will automatically redirect your old URLs, http://www.yourdomain.com/post-name to http://www.yourdomain.com/category-name/post-name.

    Now if you remove the /%category%/ part again from your permalink structure then the /category-name/ slug will be removed from your URLs and WordPress will automatically redirect them again from http://www.yourdomain.com/category-name/post-name to http://www.yourdomain.com/post-name.

    Hope this helps clarify your doubts and please don’t hesitate to let us know if you have any other questions.

    Thank you.

    Anonymous
    Rank Math free

    Thanks, maybe this is helpful. If I change the permalink on a post like https://wegrowteachers.com/20-ways-to-improve-a-test-quiz-or-other-assessment/ to add a category to the URL and then use that category to set up a bulk redirect but then remove the category from that (and other URLs) will the redirect still work?

    1. add category to permalink
    2. set up a bulk redirect using that category name
    3. remove the category from the permalink structure because I don’t want them on all posts
    4. will the bulk redirect that I set up using the category name still work?

    Anonymous
    Rank Math free

    Basically I am trying to find a way to efficiently redirect 600+ posts while leaving the other posts unaffected.

    Hello,

    Your plan should work since Rank Math will also be able to redirect non-existing URLs (after you remove the permalink again). You may try it on your end and let us know how that goes.

    Looking forward to helping you.

    Anonymous
    Rank Math free

    Thanks, I tried this on my staging site but it doesn’t seem to have worked.

    These are the steps I took.

    1. Change the permalink structure to include categories
    2. Set Rankmath to redirect all posts containing “uncategorized” which worked
    3. Changed permalink structure back to post name but the redirect no longer works

    Anonymous
    Rank Math free

    Is there a way to redirect using tags or by author?

    Hello,

    It seems to have worked from our end. Please see this video screencast: https://i.rankmath.com/v/oVk0lL

    Can you try clearing your website caches after you have set it up?

    Is there a way to redirect using tags or by author?

    Unfortunately, our plugin isn’t equipped with these types of redirections. You may need to do it via PHP condition and run the wp_redirect() function or look for any plugins that supports it.

    Looking forward to helping you.

    Hello,

    Since we did not hear back from you for 15 days, we are assuming that you found the solution. We are closing this support ticket.

    If you still need assistance or any other help, please feel free to open a new support ticket, and we will be more than happy to assist.

    Thank you.

Viewing 9 replies - 1 through 9 (of 9 total)

The ticket ‘Redirect 600+ posts in a category’ is closed to new replies.