Sitemap XML Issue

#931076
  • Resolved George Foster
    Rank Math free

    Google isn’t indexing my site, when I checked the sitemap I got the error: “error on line 2 at column 6: XML declaration allowed only at the start of the document”. I looked at your forum and checked functions.php and wp-config.php but couldn’t find any indentations in those or even any mention of XMLs. When looking at the source code of the sitemap there is a whole line of white space before the calling of the XML not just a indentation like the forum shows in the screenshot.

Viewing 2 replies - 1 through 2 (of 2 total)
  • George Foster
    Rank Math free

    I just swapped to Yoast now, it’s working? No clue why, but oh well, none of my other sites using RankMath have this issue.

    Hello,

    Thank you for contacting Rank Math and bringing your concern to our attention. I’m sorry for any inconvenience this issue may have caused you.

    Assuming you are using the latest version of all the plugins and the themes (please update if not yet), the whitespace can be added by one of your plugins or active theme.

    To determine that, please follow this troubleshooting guide:
    https://rankmath.com/kb/check-plugin-conflicts/

    Here is a video you can follow as well: https://www.youtube.com/watch?v=FcIWRhcUP2c

    Only the site admin would know and your users won’t be affected by this troubleshooting.

    If the issue persists, you can also use this script to automatically fix this error: https://wejn.org/stuff/wejnswpwhitespacefix.php.html

    Looking forward to helping 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.

Viewing 2 replies - 1 through 2 (of 2 total)

The ticket ‘Sitemap XML Issue’ is closed to new replies.