Sitemap is broken

#904991
Viewing 2 replies - 1 through 2 (of 2 total)
  • Hello,

    We apologize for the issue you are facing with your sitemap. The error message you are seeing, "XML declaration allowed only at the start of the document," typically indicates that there are some white spaces or blank lines before the XML declaration in your sitemap file.

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

    1. Check for Blank Spaces: Ensure that there are no blank lines or spaces before the ` line in your sitemap file. This could be caused by a blank line in yourwp-config.phpfile or your theme'sfunctions.php` file.

    2. Plugin Conflict: If there are no blank spaces, check for any plugin conflicts using the Health Check plugin.

    3. Clear Cache: Make sure to clear any caching plugins you might be using, as they can interfere with the sitemap functionality.

    4. Disable Caching for Sitemap: If you are using caching, consider excluding the sitemap from being cached. You can find more information on how to do this in our documentation.

    If these steps do not resolve the issue, please reply to this ticket, and a human agent from the Rank Math Support team will assist you further.

    Thank you for bringing this to our attention!

    Sources:
    Rank Math Sitemap Issues and Their Fixes » Rank Math

    Hello,

    Thank you for contacting us. We apologize for any inconvenience this issue may have caused.

    This sitemap error indicates that there must be some white space before the XML Sitemap’s source code. You can also look at the source code of your Sitemap and see if there is an extra line before the XML.

    This is usually caused by a blank line or space in your wp-config.php or functions.php file.

    It is also very much possible that your sitemap’s xml tag is missing which might be creating a blank line.

    Please follow these troubleshooting guide to fix that issue:
    https://rankmath.com/kb/fix-sitemap-issues/#xml-text-declaration
    https://wejn.org/stuff/wejnswpwhitespacefix.php.html

    We hope this helps. Please let us know if you have further questions or concerns.

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

The ticket ‘Sitemap is broken’ is closed to new replies.