XML declaration allowed only at the start of the document

#88900
  • Please help me find permanent fix for this issue below; I keep on accessing the file and removing the the blank before <? at the start of the page.

    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.

    Check the screenshot added under the sensitive data.

Viewing 8 replies - 1 through 8 (of 8 total)
  • Hello,

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

    Your sitemaps seem to be loading fine now, could you check them?

    Looking forward to helping you. Thank you.

    ​​​​​​​

    it still breaks if the site map changes

    there shuld be a permanent fix for this, could be a bug that Yoast left for Rankmath to deal with after migration, lol!

    now I am getting a new error

    “Your config file does not appear to be formatted correctly.”

    Hello,

    I am sorry but it still works for me. Could you take a screenshot when you see it happening and share it with us so we can try to check it further?

    Looking forward to help you.

    it breaks every time the sitemap is updated, then I have to go into the file directory and remove the first space on the text file. I have seen a number of similar tickets being raised here.

    Hello,

    @Noh which file are you editing?

    The space is usually related to theme or a plugin on your site. You can choose to disable your plugins one by one and switch to a default theme until you find the one causing the issue.

    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 8 replies - 1 through 8 (of 8 total)

The ticket ‘XML declaration allowed only at the start of the document’ is closed to new replies.