Error on line 1 at column 8: XML declaration allowed only at the start of the document

Hey,

So I want to add sitemap to my website and trued it using plugin xml sitemap but I am getting this error error on line 1 at column 8: XML declaration allowed only at the start of the document, I tried different plugins also bit there was no success.

I looked for solution got to know some of them out of which one was to remove white spaces from header but problem is I checked my headers, functions and main index file but couldn’t find any white space.

Please let me know if you guys have solution for this.

https://allayurveda.in/sitemap.xml

Hey @sandeepbali,

We would first like to know if this issue is caused by Pro. Please copy your site to a staging server and do the step below

  1. Update Pro to the latest version and check if the issue with your XML is fixed (do this after each step)
  2. Switch to Pro parent theme
  3. Switch to the default WordPress theme
  4. Deactivate all third party plugins and activate them one by one to check which one is causing the space.

Thanks.

Hey,

Actually I tried all the above and when I disabled the pro theme and enabled custom wordpress theme it got resolved, so may be issue with the theme.

Anyways thanks.

Thanks for updating in! Can you confirm if this has already been resolved?

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