Permalink structure redirection in self-hosted Wordpress

#770409
  • Resolved Timy
    Rank Math free

    Hello!

    My website is a self-hosted WordPress site and I’d like to change the permalink structure. Currently, I use /%year%/%monthnum%/%day%/%postname%/ but I’d like to change it to /%postname%/ only. WordPress doesn’t redirect for some reason, so I’d like to get some advice on how to set up a redirection within Rank Math so I wouldn’t break anything in the process. I have a quite a lot of content, so I’d rather not set it up one by one… Thank you in advance!

Viewing 1 replies (of 1 total)
  • Hello,

    To set up a redirection within Rank Math to change the permalink structure on your self-hosted WordPress site from /%year%/%monthnum%/%day%/%postname%/ to /%postname%/ without breaking anything and without having to do it manually for each post, you can use Regex (Regular Expression) with Rank Math. Here’s how you can do it:

    1. Navigate to Redirections:

      • Head over to WordPress Dashboard → Rank Math SEO → Redirections.

      Navigate to Redirections

    2. Add a New Redirection:

      • Click the Add New button in the Redirections Manager.

      Add New Redirection in Rank Math

    3. Use Regex for Change in Permalink Structure:

      • In the Source URLs field, add the following regex:
        ^d{4}/d{2}/d{2}/(.*)$
      • In the Destination URL field, replace yourdomain.com with your actual domain:
        https://rankmath.com/wp-content/uploads/2022/09/add-new-redirection.jpg

      Creating regex redirect for change in permalink structure

    4. Save Changes:

      • Click the Add Redirection button to apply the changes.

    This setup will automatically redirect visitors from URLs with the old structure to the new structure without having to manually update each post. If you need further assistance or encounter any issues, feel free to reach out to our dedicated support team for help.

    Thank you for reaching out! Let me know if you need any more assistance.

    Sources:
    WordPress Permalink Structure & Changing Individual URLs » Rank Math
    How to Remove a Specific Word From Your Permalinks (URLs) » Rank Math
    How to Redirect Posts After Changing URLs » Rank Math

    This is an automated reply from Rank Math Support Bot. If you need further assistance, please reply to this topic and a human support agent will reply to you shortly.

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

The ticket ‘Permalink structure redirection in self-hosted Wordpress’ is closed to new replies.