error on line 2 at column 6: XML declaration allowed only at the start of the do

#75416
  • Resolved Ben Van Dessel
    Rank Math pro

    Hi guys,
    This topic was resolved earlier in a similar case.

    But … we have no blanc spaces in our wp-config.php file or in our sitemap_index.xml file.

    We checked the knowledge-base already.

    We can edit the files by ourselves. Which other files need to be checked in order to solve this common issue?

    We have no caching plugins running, nor firewalls, …

    We added https://ourwebsite/sitemap_index.xml to our robots.txt file as well.

    Thanks.

Viewing 1 replies (of 1 total)
  • Hello,

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

    Please do the following to check if it is your theme or one of your plugins causing this:
    1. Install a default theme(if you don’t have one) such as Twenty twenty theme and activate it. Check your sitemap in an incognito browser. If the issue persists,go to step 2.

    2. Deactivate your plugins, one by one, while testing your sitemap in a private browser to find which of your plugins, if any, that is causing the issue.

    3. If none of the above works, then it is likely coming from one of your WP root files.

    Looking forward to helping you. Thank 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 1 replies (of 1 total)

The ticket ‘error on line 2 at column 6: XML declaration allowed only at the start of the do’ is closed to new replies.