Hello,
I understand that you are facing an issue with the sitemap on your website themamasutra.com after switching from Yoast to Rank Math. The error message you provided indicates an XML declaration error.
To resolve this issue, you can follow these steps:
-
Check for Blank Spaces: Ensure there are no blank spaces before the XML Sitemap’s source code. These spaces might be added by a blank line/space in your wp-config.php file or your theme’s functions.php file.
-
Disable Caching: Disable any caching plugins or server-level caching that might be interfering with the sitemap functionality. You can exclude the sitemap files generated by Rank Math from being cached in your caching plugin. Here is a guide on how to exclude sitemaps from caching.
-
Plugin Conflict: Check for any plugin conflicts using the Health Check plugin as conflicting plugins can sometimes affect the sitemap functionality.
If the issue persists after following these steps, please let us know, and we will be happy to assist you further.
Thank you for reaching out with your concern!
Sources:
Why the Sitemap_Index.xml is Throwing a 404 Error » Rank Math
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.
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 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.
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.
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.