Hello,
We apologize for the issue you are facing with setting up your 301 redirect. It seems like you are on the right track, but let’s clarify how to set up the regex correctly for your specific case.
To redirect all listings in the subfolder /explore/ to the main explore page, you can use the following regex:
Source URL:
^/explore/listing-.*
Destination URL:
/explore
This regex will match any URL that starts with /explore/listing- and redirect it to /explore.
Here’s how to set it up in Rank Math:
- Go to Rank Math SEO → Redirections in your WordPress dashboard.
- Click on Add New.
- In the Source URL field, enter the regex pattern above.
- In the Destination URL field, enter
/explore.
- Make sure to select Regex as the type.
- Click on the Add Redirection button to save your changes.

If you continue to experience issues, please reply to this ticket, and a human agent from the Rank Math Support team will assist you further. Thank you for raising this concern!
Sources:
How to Redirect Posts After Changing URLs » Rank Math
Hello,
Thank you for contacting us and bringing your concern to our attention.
Please note that Rank Math Redirection doesn’t support a forward slash at the beginning of the source URL so you’ll have to add the redirection like the following one:
Source: explore/(.*)
Match: regex
Destination: /explore
However, please note that Rank Math redirection doesn’t have such conditions so the above redirection will be applied even your posts are not expired or trashed.
Hope that helps and please don’t hesitate to let us know if you have any other questions.
Â
Thank you.
Hi,
Thanks for your reply. So the redirection will be made even for live posts?
Isn’t a snippet available that will trigger the redirection only when the post is expired or trashed, please?
I believe this is a must for listing websites that are using rankmath.
Thank you
Hello,
I’m afriad this is not possible with Rank Math redirections at this time, but WordPress is very customizable, I’m sure you can speak with your developer to for a custom tool that achieves your aim.
Don’t hesitate to let us know if you need help with anything else.
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.