Hello, I’m sorry to hear that you’re experiencing issues with your sitemap. The error you’re seeing is related to the XML declaration not being at the start of the document. This can cause issues with parsing the XML file.
To resolve this, you will need to ensure that there are no characters or spaces before the XML declaration in your sitemap file. Once you’ve made the necessary adjustments, please validate your sitemap using a tool like XML Sitemaps to confirm that the issue has been resolved.
If you continue to experience issues after making these adjustments, please feel free to reach out to us for further assistance by assigning this ticket to a human agent using the available buttons.
Sources:
Rank Math Sitemap Issues and Their Fixes » Rank Math
Troubleshooting the “Couldn’t Fetch” Error in Google Search Console » Rank Math
How to Fix “Incorrect HTTP Header Content-Type” Error in Sitemaps » Rank Math
Indexed, Not Submitted in Sitemap – Google Search Console » Rank Math
How to do it? There it no option to remove comment
Hello,
We have already removed your website from your initial message.
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
Let us know how this goes.
Hello,
Thank you for the update.
We are super happy that this issue is already resolved. If you have any other questions in the future, know that we are here to help you.
If you don’t mind me asking, could you please leave us a review (if you haven’t already) on https://wordpress.org/support/plugin/seo-by-rank-math/reviews/#new-post about your overall experience with Rank Math? We appreciate your time and patience.
If you do have another question in the future, please feel free to create a new forum topic, and it will be our pleasure to assist you again.
Thank you.