Hello,
I’m sorry to hear about the issue you’re facing with the relative URLs in your sitemap. It seems like the plugin is generating relative URLs for the location pages instead of the absolute URLs you need.
To resolve this issue, you can create a custom sitemap and include it in Rank Math. This will allow you to specify the absolute URLs for the location pages.
Here’s how you can create a custom sitemap and include it in Rank Math:
- Navigate to WordPress Dashboard → Appearance → Theme File Editor (for Classic Theme) or WordPress Dashboard → Tools → Theme File Editor (for Block Theme).
- Create a new file in your child theme folder and name it custom-sitemap.php.
- Add the necessary code to specify the absolute URLs for the location pages in the custom-sitemap.php file.
You can refer to this article on how to create custom sitemaps and include them in Rank Math for detailed instructions and code examples.
If you need further assistance with creating a custom sitemap, feel free to reply, and we’ll be happy to help.
Thank you for bringing this concern to our attention.
Sources:
Rank Math Sitemap Issues and Their Fixes » Rank Math
Why Did My Website Disappear From Google Search? » Rank Math
Troubleshooting the “Couldn’t Fetch” Error in Google Search Console » Rank Math
How to Create a Custom Sitemap and Include It in Rank Math » Rank Math
Hello,
Could you please confirm if you have added those URLs manually using this filter?
https://rankmath.com/kb/custom-sitemaps/
The guidelines state that the sitemaps should include full URLs, much like you see from the sitemaps our plugin generated.
If not, then this can be caused by conflicting plugin/theme on your site.
Assuming you are using the latest version of all the plugins and the themes (please update if not yet), to determine that, please follow this troubleshooting guide:
https://rankmath.com/kb/check-plugin-conflicts/
Here is a video you can follow as well: https://www.youtube.com/watch?v=FcIWRhcUP2c
Only the site admin would know and your users won’t be affected by this troubleshooting.
Let us know how this goes.
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.