Change the permalinks for all posts

  • Resolved Daniel Moniz
    Rank Math free


    I have a WordPress site and my permalinks are currently set to the date + name. I would like to change this to the post name only. I already know that I must redirect all the links on my site because of this change and I have implemented the following Regex redirection:

    Source URLs: /([0-9]{4})/([0-9]{2})/(.+)
    Type: Regex
    Destination URL:$3

    Indeed all my urls end up being redirected but not in an ideal way, because it makes a double redirection before reaching its final destination. Any solution for this?

    • This topic was modified 3 years, 9 months ago by Daniel Moniz.
Viewing 6 replies - 1 through 6 (of 6 total)
  • Hello,

    Thank you for contacting Rank Math and sorry for any inconvenience that might have been caused due to that.

    since your dates contain the month, year and date, please use the following as the source:


    Looking forward to helping you. Thank you.



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

    Thank you.

    Hello Michael,

    Thank you for responding so quickly.
    I tried the Regex you gave me before and now I ended up with a 404. In the area of sensitive data you have more information about it.

    Thanks in advance!


    Please try this:
    Source: \d{4}/\d{2}/\d{2}/(.*)
    Type: Regex
    Target: $1/$2
    Ignore Case: Enabled

    Here is a screenshot for reference:

    We just tested it and it is working, 100%.

    Hope that helps.

    Hello Uzair,
    Thank you for taking the time to help me with this issue. Indeed, the Regex expression you indicated worked perfectly. Thank you very much!


    We are super happy that this resolved your issue. If you have any other questions in the future, know that we are here to help you.

    If you don’t mind me asking, could you please leave us a review (if you haven’t already) on about your overall experience with Rank Math? We appreciate your time and patience.

    If you do have another question in the future, please feel free to create a new forum topic, and it will be our pleasure to assist you again.

    Thank you.

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

The ticket ‘Change the permalinks for all posts’ is closed to new replies.