Sitemap output issue caused by Rank Math

#1089788
  • Resolved Szilveszter Varga
    Rank Math free

    Hello Rank Math Support Team,

    I would like to report an issue I encountered with the sitemap functionality in Rank Math. When the sitemap module is enabled, the XML sitemap (/sitemap_index.xml) throws an error:

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

    After testing, I confirmed that this issue is caused by Rank Math itself. When I disable the sitemap module in Rank Math, the problem disappears and the sitemap works normally with an alternative sitemap plugin. I also verified that none of the other active plugins or my theme are causing the issue.

    Could you please investigate this bug? It seems Rank Math is sending unexpected output before the XML declaration, which breaks the sitemap.

    Thank you for your help and for the great plugin!

    Best regards,

Viewing 1 replies (of 1 total)
  • Hello,

    We apologize for the issue you are facing with the sitemap functionality in Rank Math. The error you are encountering, "XML declaration allowed only at the start of the document," typically indicates that there is some unexpected output before the XML declaration in your sitemap.

    Here are a few steps you can take to troubleshoot this issue:

    1. Check for Whitespace: Ensure there are no blank lines or spaces before the `

    This is an automated reply from Rank Math Support Bot. If you need further assistance, please reply to this topic and a human support agent will reply to you shortly.

    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 ‘Sitemap output issue caused by Rank Math’ is closed to new replies.