sitemap error

#971454
  • Heniek
    Rank Math free

    Hello there, on my website the sitemap does not work. there is only the message: This page contains the following errors:
    error on line 5 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.
    Please help

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 extra spaces or blank lines before the XML declaration in your sitemap file.

    Here are some steps you can take to resolve this issue:

    1. Check for Blank Spaces: Ensure 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. You can use the Health Check plugin to help identify if a plugin is causing the issue.

    3. Clear Cache: Make sure to clear any caching on your site, as cached versions of your sitemap may interfere with its functionality.

    If you continue to experience issues, please reply to this ticket and include your site URL so that a human agent from the Rank Math Support team can assist you further.

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

    This is an automated reply from Rank Math Support Bot. Your ticket has been assigned to a human agent and we will get back to you shortly.

    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 this troubleshooting guide to fix that issue:
    https://rankmath.com/kb/fix-sitemap-issues/#xml-text-declaration

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

    Thank you.

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

You must be logged in to reply to this ticket.