Hello @pete3xy,
Thank you for contacting Rank Math support, and sorry for any inconvenience that might have been caused due to that.
The error message you are seeing indicates that there is some extra content before the XML declaration of your sitemap file.
Those whitespaces are being added there if there are blank spaces in your wp-config.php file or your theme’s functions.php file.
Also, this could be caused by a plugin, theme, or server configuration issue that adds whitespace, comments, or other output before the sitemap is generated.
Most likely a plugin has added blank whitespace at the beginning or end of its code. To determine that, please follow the steps here to check a conflict on your site:
https://rankmath.com/kb/check-plugin-conflicts/
You can check this link for more information:
https://rankmath.com/kb/fix-sitemap-issues/#xml-text-declaration
Hope that helps.
Hello, thanks. I tried few then was too hard as I have too many plugins and checked wp-config and deleted the spaces. After that started to work again. Thanks again.
Hello @pete3xy,
We are glad that everything is sorted with the sitemaps as they are essential to help search engines discover pages on your website.
Don’t hesitate to get in touch if you have any other questions.