-
RankMath is changing the slug of my pages and breaking them. I don’t understand why its changing the slug of my pages to another page’s slug with numbers like” -2, -3″ without my permission or me setting it up like that or giving it permission. There is another ticket like this but there was no clear answer so I started another one.
-
Hello,
We apologize for the issue you are facing with Rank Math changing the slugs of your pages unexpectedly. This can indeed be frustrating, especially when it leads to broken links.
When you change the slug of a page after it has been published, if there is already a page with the same slug, WordPress automatically appends a number to the new slug (like
-2
,-3
, etc.) to avoid conflicts. This behavior is part of how WordPress manages slugs to ensure that each URL remains unique.To prevent losing traffic from the old URLs, it’s important to set up redirects from the old slugs to the new ones. You can find more information on how to manage redirects using Rank Math here.
If this behavior is not what you intended or if you believe there is a bug, we recommend replying to this ticket so that a human agent from the Rank Math Support team can assist you further and provide a more tailored solution.
Thank you for raising this concern, and we appreciate your patience as we work to resolve it!
This is an automated reply from Rank Math Support Bot. Your ticket has been assigned to a human agent and we will get back to you shortly.
Hello,
The number is added if there are other URLs with the same slug. Please check your URLs as well if it’s getting duplicated.
If none, then this happens when the Redirect Attachments option is enabled on your site, and you have a media or attachment URL with the same slug.
If that is the case, you can re-upload the media with a different file name or at least rename the attachment URL to a different slug to avoid getting the
-2
or-3
in the last part of the URL.Let us know how this goes.
There are pages with same slug and that how I want it. I use canonical for that. The big problem I have is that RankMath is changing the slug to another pages slug with a number added to it. e.g there are two page slugs like “mobile-accessories” and another “home-electronics”. It changes “mobile-accessories” to “home-electronics-2”, which doesn’t make sense at all. I’m assuming this might be a bug. I just want to make RankMath stop changing slugs because its breaking my website and causing a 404. I have deactivated it for now to stop it from changing slugs.
Hello,
WordPress and not Rank Math add those numbers to make the slug unique for each page/post/CPT.
If you don’t want to change the attachment URLs with the same slug you should disable the Redirect Attachments option on your site.
We hope this helps. Please let us know if you have further questions or concerns.
Thank you.
If its WordPress was doing it then why did it stop changing when I disabled RankMath? I didn’t have this problem before I installed RankMath. I also didn’t enable any kind of redirects.
Hello,
Can you please share all the steps you did to reproduce the issue?
Also, we might need to take a closer look at the settings. Please edit the first post on this ticket and include your WordPress login in the designated Sensitive Data section.
Please do take a complete backup of your website before sharing the information with us.
It is completely secure and only our support staff has access to that section. If you want, you can use the below plugin to generate a temporary login URL to your website and share that with us instead:
https://wordpress.org/plugins/temporary-login-without-password/
You can use the above plugin in conjunction with the WP Security Audit Log to monitor what changes our staff might make on your website (if any):
https://wordpress.org/plugins/wp-security-audit-log/
We really look forward to helping you.
I wouldn’t mind doing that but how would I know what page URL’s had been changed after installing it on my website because the URL change was happening in the background. How about I try to recreate the exact situation offline and give you screenshots of it?
Hello,
In this case, please share a screen recording showing how we can replicate this. You can use a tool like https://loom.com/ so we can understand the issue better.
We look forward to hearing from you.
Thank you.
Hey, I couldn’t replicate the issue on the offline copy of my website. So I guess I will have to try to replicate the issue on my live website again. Maybe I didn’t do the same exact thing or its not the same because its offline. I will do a fresh install of RankMath and keep using it like I did before. I will update you if the issue persists. I really wanna use RankMath because you guys put out amazing SEO content and tutorials on YouTube.
Thanks for taking the issue seriously.
Hello,
Sure! If you replicate the issue again, please share a screencast with us so that we can check this further for you.
Meanwhile, please don’t hesitate to let us know if you have any other questions.
Looking forward to helping you.
Thank you.
Hello,
I have updated the sensitive data as requested. Can you please check further?
Thank you.
Hey guys its happening again. I installed RankMath a few day ago with default settings (didn’t touch anything in the settings). Today while I was editing a page with Elementor I believe I used an image that was being used on another page and it changed the url to a page that didn’t even have the image. The original URL was “electronics/laptops-desktop-computers-accessories-peripherals/computer-accessories/” then it changed to “/electronics/laptops-desktop-computers-accessories-peripherals/laptops-desktop-computers-accessories-peripherals/”. There is a memory card image that I Used in “Mobile Accessories” page and now I used it on “Computer Accessories” which I believe might be the cause. I checked to make sure “Redirect Attachments” setting was not turned on and it wasn’t. The detail is also available in the “404 Monitor”.
I also have created pages with the same slug like “Memory Cards” under different parents like “Computer Accessories” & “Mobile Accessories”. But the change is happening in the parent pages not the child “Memory Cards”. Its a bit bizarre, hopefully you fill figure it out.
Hello,
We deeply apologize for the unexpected delay in response.
Can you please share a screencast with us by using a tool like https://loom.com? It will help us to follow the exact steps to replicate the issue.
We are looking forward to helping you.
Thank you.
There is nothing to show with a video it all happens in the background. Thanks for the help but I’m not installing it again. Its preventing me from working comfortably because I’m worried about what page is gonna change.
You must be logged in to reply to this ticket.