Sitemap containing errors

#255674
  • Hi,
    I get the following message when clicking on the link to my sitemap:

    “This page contains the following errors:
    error on line 2 at column 6: XML declaration allowed only at the start of the document
    Below is a rendering of the page up to the first error.”

    Why does this problem occur and how do I fix it? Where can I edit the sitemap?

    Best regards, Inger

Viewing 3 replies - 1 through 3 (of 3 total)
  • Azib Yaqoob
    Rank Math business

    Hello,

    Thank you for contacting Rank Math and sorry for any inconvenience that might have been caused due to that.

    Rank Math does not cause this issue. Most often the cause of this issue is an empty line at the beginning of the <?php line or at the end of the wp-config.php or functions.php file. If you don’t find such an issue then we would recommend you to run a conflict check to determine the cause of this issue:

    https://rankmath.com/kb/check-plugin-conflicts/

    Also, make sure your cache is disabled as it is highly likely that the cache is interfering with the working of Sitemap functionality of Rank Math.

    Hope that helps.

    Hi,
    Thank you very much for helping. The problem was a conflict with the child-theme. Changing back to the original theme solved the problem.

    Best regadrs, Inger

    Hello,

    Thank you for the update.

    We are super happy that this issue is already resolved. If you have any other questions in the future, know that we are here to help you.

    If you don’t mind us asking, could you please leave us a review (if you haven’t already) on https://wordpress.org/support/plugin/seo-by-rank-math/reviews/#new-post about your overall experience with Rank Math? We appreciate your time and patience.

    If you have another question in the future, please feel free to create a new forum topic, and it will be our pleasure to assist you again.

    Thank you.

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

The ticket ‘Sitemap containing errors’ is closed to new replies.