-
Hello
I added redirection in rankmath from (.*) to $1 but not working and all pages of my website except the home page are unavailable.
pleas help me.
-
Hello,
We apologize for the issue you are facing with the regex redirection in Rank Math. It seems that the regex pattern you used might be causing an infinite loop or matching too many URLs, which can lead to your pages becoming unavailable.
To resolve this, please check the following:
- Review Your Redirects: Ensure that there are no conflicting redirects that might be causing the issue. If you have a redirect that points to itself, it can create an infinite loop.
- Use the Redirection Debugger: Rank Math has a redirection debugger that can help diagnose potential issues with your redirects. This tool can provide insights into what might be going wrong.
- Modify Your Regex: If you intended to redirect specific pages, ensure your regex pattern is correctly defined to match only those pages. For example, if you want to redirect all pages under a specific path, your regex should be more specific than just
(.*).
If you’re still having trouble after checking these points, 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!
Hello
I checked all these things but my problem was not solved.Hello,
The redirection you added is not correct. Could you please confirm what are you trying to redirect?
The regex you created makes a redirect loop since all of your pages will only redirect to their own.
We have disabled the redirect you created to avoid the redirect loop issues on your site.
Looking forward to helping you.
Hello,
Please share some exact source and destination URLs so that we can assist you in creating the regex redirection for your website.
Looking forward to helping you.
Thank you.
Hello
Like this :I already had a post with this url:
https://ponel.ir/websiteI changed the url to this:
https://ponel.ir/why-reason-website
And now I want to change the url again to the original address:
But didnt work.


Hello,
Since you have changed back the permalinks to
/website, you can simply remove the Source URL/websiteto avoid a redirection loop. Your focus here is to redirect only/why-reason-websiteto/website.As for the regex redirection rule you’ve shared, it is not the correct way of using it as it will only cause another redirection loop. Regex is meant to target specific URL patterns and using regex redirection to redirect the entirety of your URLs will cause the website basically unusable.
Don’t hesitate to get in touch with us if you have any other questions.
Hello
If I delete the/website, the redirects from my previous domains will not be transferred with the same url.Hello,
If you don’t remove
/websitefrom your source URL, it will create a redirection loop.However, please note that Rank Math doesn’t handle server/domain-level redirection. In this case, can you please confirm which redirection you’re referring to from your previous redirection?
Looking forward to helping you.
Thank you.
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.
The ticket ‘Regex in redirection not working’ is closed to new replies.