Hello,
We apologize for the issue you are facing. Unfortunately, we don’t have specific information on a hook or filter to change the sitemap index URLs directly in the context provided.
We recommend replying to this ticket, and a human agent from the Rank Math Support team will be able to assist you further with your request. Thank you for raising this concern!
I have already managed to modify the posts domains by using rank_math/sitemap/entry hook, and but this doesn’t modify the sitemaps urls in the index page.
Hello,
Please note that the sitemap uses the domain used on your WordPress Dashboard > Settings > General.
It is not possible to use a different domain inside the sitemap index as Rank Math’s sitemaps are created on its own domain.
Looking forward to helping you.
So there isn’t a hook that can be used to modify this domain url specifically for that page ?
Hello,
Unfortunately, there’s no filter to modify the domain part of the sitemap URLs.
We only have a filter to insert URLs manually into the sitemap:
https://rankmath.com/kb/filters-hooks-api-developer/#add-extra-urls-in-sitemap
Or create custom sitemaps by following this guide:
https://rankmath.com/kb/custom-sitemaps/
Looking forward to helping 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.