Hello,
Thank you for contacting Rank Math Support. We are sorry for any inconvenience this must have caused you.
The sitemap error you are getting indicates that there must be some white space before the XML Sitemap’s source code.
You can also look at the source code of the sitemap and see if there is an extra line before the XML.
This is caused by a blank line or space in your “wp-config.php” or “functions.php” file.
To troubleshoot this, please follow this guide. https://rankmath.com/kb/fix-sitemap-issues/#xml-text-declaration
Let us know how this goes. We are looking forward to helping you.
Thank you.
Thanks Caleb.
You are right. I noticed a blank line at the beginning of the XML file.
You have asked me to check wp_config.php or function.php files to check if these blank line is caused by either of them or not.
MY question is exactly how do I locate that or In other words what I should look into to cofirm if that is the case?
regards,
Anarul
Hello,
You can access your wp-config.php
and theme’s functions.php
files via FTP or CPanel’s file manager and after opening those files, please check if there is any blank line or not:
If you find any blank lines on those files, please remove them and save the changes.
However, if you’re not able to see any blank lines, then you can try to follow this guideline and see if that works for you: https://wejn.org/stuff/wejnswpwhitespacefix.php.html
Let us know how it goes. Looking forward to helping you.
Thank you.
Hi Rakibuzzaman,
Could not detect empty line/space.
However the fix php script did the trick. Thank you, it works now.
Anarul
Hello,
We are super happy that this resolved your issue. 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.