Add redirect priority

#377712
  • Resolved Nicohood
    Rank Math free

    Hi!
    I would like to have the following redirects:

    * /qr/1 -> /page-with fun
    * /qr/2 ->/page-with-shop`
    * /qr/* -> / (as a fallback)

    Now this setup actually works for my installation, but I am not sure why. Maybe I am in luck, that the regex is triggered last and the more specific url is used first. However I would not want to rely on that luck.

    Is rankmath adding some magic to prefer static 100% match redirects over regex? Otherwise wouldn’t it be good to prioritize different redirects by adding a priority option?

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

    Thank you for contacting Rank Math support, and sorry for the unexpected delays and any inconvenience that might have been caused due to that.

    At the moment, we don’t have a priority order option in our redirection rules. The redirector will ignore the next rule/s if a similar rule is already matched and triggered.

    With that said, our developers are constantly improving our plugin, especially the redirection module and we valued your input. Thank you so much for sharing it.

    Please do not hesitate to let us know if you need our assistance with anything else.

    Hm, that is not satisfying to me. I’d like to have a more detailed feedback from a developer, if that is possible. We might be able to tweak that automatically (maybe it already is), and if so we should inform the user about the priority ordering. That would improve the handling and avoid confusion.

    Hello,

    Allow me to share this with our developer. We should get back to you with feedback from them.

    In the meantime, please do not hesitate to let us know if you need our assistance with anything else.

    Thank you.

    Hello,

    The priority is decided based on the order in which the redirection rules were created. The latest redirection rule takes priority over the previous ones. On your site, I think the regex is triggered last because you must have created the Regex redirection rule before adding other redirection rules.

    As far as prioritizing the redirection rules are concerned, as of now, we do not have any plans of adding this feature. But I have added this as an enhancement to our internal to-do lists. If it’s something we are able to integrate, we’ll be sure to let you know.

    In the meantime, if you need any other assistance, please feel free to let us know. We are here to help.

    Thank you.

    Thanks for clarifying!

    Wouldn’t it make sense to at least prefer exact matches over all other matches (startswith, regex, etc)? This would be the most simple and intuitive solution, as a first step.

    Hello,

    Thank you for your valuable suggestion.

    It does make sense to give priority to the exact matches over the other comparisons but I am afraid this might slow down the plugin. If a site has 100s of Redirection rules then looking for the exact matches first and then checking for other matches would need multiple queries.

    With that being said, there are existing feature requests, so I’ve added your vote to our internal suggestions lists. If it is something that we’re able to introduce, we’ll be sure to let you know.

    If you have any further question(s), please let us know.

    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 6 replies - 1 through 6 (of 6 total)

The ticket ‘Add redirect priority’ is closed to new replies.