Hello,
I’m sorry to hear that you’re facing issues with your sitemap and encountering an XML declaration error. This error typically occurs when there are white spaces or characters before the XML declaration in the sitemap file.
To resolve this issue, you can follow these steps:
-
Check for any blank spaces or lines in your wp-config.php file or theme’s functions.php file that might be adding unwanted characters before the XML declaration.
-
If there are no blank spaces in those files, you can use the Health Check plugin to detect any conflicts caused by other plugins interfering with the sitemap functionality.
-
Ensure that your caching plugin is disabled temporarily as it might be affecting the sitemap’s proper functioning.
If you need further assistance, please let us know by replying to this ticket. Thank you for reaching out to us!
Sources:
Rank Math Sitemap Issues and Their Fixes » Rank Math
Hello,
Thank you for contacting us and sorry for any inconvenience that might have been caused due to that.
We checked your sitemap and we can see some invalid HTML tags are getting added to the source code of your sitemap and that’s why it is not working properly. Please check the screenshot in the sensitive data section for your reference.
This issue could be caused by conflicting plugins/themes on your website. Kindly make sure you are using the latest version of all the plugins and themes, please update if not yet.
Here’s a guide for troubleshooting further if the issue persists:
https://rankmath.com/kb/check-plugin-conflicts/
You can also follow the steps in this video:
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 it goes. 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.