Hello,
Thank you for contacting us and sorry for any inconvenience that might have been caused due to that.
This sitemap error indicates that there must be some white space before the XML Sitemap’s source code. You can also look at the source code of Sitemap and see if there is any extra line or space before the XML. This is caused by a blank line or space in your wp-config.php
or functions.php
file.
Please follow this troubleshooting guide to fix that issue:
https://rankmath.com/kb/fix-sitemap-issues/#xml-text-declaration
Let us know how it goes. Looking forward to helping you.
Thank you.
if rank math not able to fix this issue. so please work on your plugin because of that any person who used rank math he is totaly upset . i m also very dispersed
Hello,
We are sorry and we can understand how frustrating it can be when something doesn’t work as expected.
But unfortunately, this error is not something from our plugin. As we already mentioned above, this is usually caused by a blank line or space in your wp-config.php
or functions.php
file. If you’re not able to find the blank line or space on your files then you can try to follow this guideline to fix this issue: https://wejn.org/stuff/wejnswpwhitespacefix.php.html
If you want, we can also do this for you. In this case, please edit the first post on this ticket and include your WordPress & FTP logins in the designated Sensitive Data section.
Please do take a complete backup of your website before sharing the information with us.

It is completely secure and only our support staff has access to that section. If you want, you can use the below plugin to generate a temporary login URL to your website and share that with us instead:
https://wordpress.org/plugins/temporary-login-without-password/
You can use the above plugin in conjunction with the WP Security Audit Log to monitor what changes our staff might make on your website (if any):
https://wordpress.org/plugins/wp-security-audit-log/
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.