Error appearing on Yoast sitemap page

From Yoast
We looked at your sitemap and we see something in your WordPress install, either a plugin or your currently active theme is outputting whitespace (see the attachment screenshot), and it shouldn’t output white space. Please, refer to this document for more information about the issue: Sitemap error: XML declaration allowed only at the start.

The blank space or line issue could occur due to a number of potential factors (there is a blank line before or after the closing PHP tag in your currently active theme or 3rd party plugins code is most common). In this case, you’ll need to identify the relevant blank line from your theme or contact the theme developer assistance and having them fix it for you. There should not be an empty line before or after the PHP closing tag.

In addition, you can switch your theme temporarily to the WordPress default 2017 theme to see if this resolves the issue (which should). If this resolves the issue, you’d need to reach out your theme developer for assistance to find out why the theme is showing the blank line or space before the XML sitemaps get starts.

Additionally, you can perform a conflict check. This will narrow down the conflict to a specific plugin or a theme conflict. If you are unfamiliar with checking for conflicts, we wrote a small guide that will walk you through the steps. You can find it here: How to Check For Plugin Conflicts.

Please let us know if you’ve any further questions

https://d1ro8r1rbfn3jf.cloudfront.net/ms_126298/ztDfgzzoniG3fhyIXOsDVw590JbvSN/https___www.velocitywebsites.co.nz_sitemap_index.xml%2B-%2BGoogle%2BChrome%2B2017-07-06%2B13.54.28.png?Expires=1499392548&Signature=e-8~nqZd7JVuSKNk0uIplKr9EXo-LyyRROknUNfNJ~FP3jpOQidvHLhe3nCjj9mDGBYmBzcqujpX~5HkC~PlN7avM6JNt9aBvBaPDNuoASG~gxf22-ysOh1bn7YOaGEwgIWbW7p6YSozXpFuGfYVza1F2ITWkF2XaNBiJGA8XxxvhbEFIbgm0Z0ycaP9ua9XtEKD~9hKSmE614c0RaIO0QUfF56hlmpoKeyImWvhK9pNPupmCRVrfk5ldOrZGpXqmvPPjGkxSalgJMGGfF7KwTeEHst4R7ox6fv0SZkywbs5P09mm0buGccOfVotUOAhjJRa-LfBjE1pBUi0r3Q~Xg__&Key-Pair-Id=APKAJHEJJBIZWFB73RSA

Hello There,

To assist you with this issue, we’ll first need you to provide us with your URL of your sitemap page. This is to ensure that we can provide you with a tailored answer to your situation. Once you have provided us with your URL, we will be happy to assist you with everything.

Thank you in advance.

Hello There,

Thanks for providing the url of your site. I have checked your sitemap.xml and I am seeing an error: https://prnt.sc/ft2pmw
This is something relate to WordPress or any modification you have made within your child theme. There is a related issue on this link: https://stackoverflow.com/questions/14685893/xml-declaration-allowed-only-at-the-start-of-the-document

Could we have access to your WordPress dashboard or in your child theme so that we can take a closer look?

Thank you in advance.

The problem has sorted itself out. I downloaded and activated the pro theme and checked again and it was working. Not sure if they are related but could be. :grinning:

Thanks for letting us know!

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.