Auto post redirect

#352130
  • Resolved Hasse Simonsen
    Rank Math pro

    Hi there,
    I want to change the permalink structure of a website. Do I have to manually add all the redirections from my posts or can I use “auto post redirect” and it will then redirect?
    Thanks!

Viewing 8 replies - 1 through 8 (of 8 total)
  • Hello,

    Thanks for contacting us and sorry for any inconvenience that might have been caused due to that.

    The Auto Post Redirect feature only works when you edit the slug of a post-type/taxonomy. It doesn’t work when changing the permalink structure from the permalink settings of WordPress.

    In this case, you will have to either create redirections manually for each post or you can use the regex to create a redirection rule that redirects your old permalink structure to the new one.

    Please share the old and new permalink structures so we can suggest a redirection rule.

    Looking forward to helping you.

    Hello,

    I have updated the sensitive data as requested. Can you please check further?

    Thank you.

    Hi!
    Thanks for the quick reply.
    I haven’t changed it yet, but I want to change from “day & name” to “post name”

    Hello,

    Upon changing permalinks, WordPress should handle the redirect from the old URLs to the new ones. In case the redirect would not be applied automatically, you can add a regex redirect using Rank Math so all of your posts will be automatically redirected to the new permalink structure.

    The redirect should be done like this:

    Source: /\d{4}/\d{2}/\d{2}/(.*)
    Type: Regex
    Destination: /$1

    Here’s a link for more information:
    https://rankmath.com/kb/how-to-use-regex-redirects/#num-3-add-regex-redirect

    I hope that helps.

    Thank you.

    Thanks, I guess it would still be best practice to update internally to the new URL’s?

    Hello,

    You’re welcome.

    Yes, to ensure that your old URLs are not throwing the 404 error, you can add the regex redirect which covers all your posts.

    If you have any other concerns, please don’t hesitate to contact us anytime to assist you further.

    Looking forward to helping you.

    Thank you.

    Hi there,
    This is for some reason not working anymore?

    Hello,

    Please update the source URL and remove the first forward-slash (/).

    Here’s the new source you can copy:

    /d{4}/\d{2}/\d{2}/(.*)
    

    I hope that helps.

    Thank you.

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

You must be logged in to reply to this ticket.