Hello, I’m sorry to hear that you’re experiencing issues with your sitemap. The error message you’re seeing indicates that there is an issue with the XML declaration in your sitemap file. This can cause the sitemap to fail to load properly.
To address this issue, you can follow these steps:
-
Check for any white spaces before the XML Sitemap’s source code. You can use the Health Check plugin to determine if there is a conflict with another plugin or theme.

-
If there are no white spaces in your wp-config.php or functions.php file, consider disabling your cache, as it may be interfering with the functionality of the sitemap.
-
If the issue persists, you may need to flush the sitemaps cache and exclude it from caching using the instructions provided in our article on excluding sitemaps from caching.
If you continue to experience issues after following these steps, please let us know, and we’ll be happy to assist you further.
Sources:
Rank Math Sitemap Issues and Their Fixes » Rank Math
Troubleshooting the “Couldn’t Fetch” Error in Google Search Console » Rank Math
Hello,
Thank you for the update.
We’re glad that you have already managed to resolve this issue by applying the steps in the link you have shared.
If you have any other concerns, please don’t hesitate to contact us anytime to assist you further.
Looking forward to helping you.