Problem With Sitemap (Rank Math Free)

#670989
  • Resolved Anonymous
    Rank Math free

    I have the submit the Rank Math schema on my website which is showing some errors-

    This page contains the following errors:
    error on line 1 at column 792: XML declaration allowed only at the start of the document
    Below is a rendering of the page up to the first error.

    I have tried-

    De-activate and Re activate the plugin
    Check the function.php and wp-config.php files
    Clear Caches/Cookies
    Install Troubleshooting plugin and check the health score of the website but still I am getting the same problem

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

    I’m sorry to hear that you’re experiencing issues with the Rank Math sitemap on your website. It looks like you’ve already taken several steps to troubleshoot the problem, but the issue persists.

    The error message you’re seeing, “error on line 1 at column 792: XML declaration allowed only at the start of the document,” indicates that there might be some whitespace or other content before the XML declaration in the sitemap file.

    To resolve this issue, you can try adding a filter to your theme’s functions.php file. Here’s how you can do it:

    1. Navigate to WordPress Dashboard → Tools → Theme File Editor (Block Editor) or WordPress Dashboard → Appearance → Theme File Editor (Classic Editor).

    2. Choose the functions.php file from the right sidebar and add the following filter:

      add_filter( 'rank_math/sitemap/enable_caching', '__return_false');
    3. Once you’ve added the filter, click on the Update button to save your changes.

    After making these changes, clear your website cache and then check the sitemap again. This should resolve the error you’re encountering.

    If you’re still facing this error or need further assistance, please feel free to reach out to our support team directly from here, and we’re always here to help.

    I hope this helps! Let me know if you have any other questions or concerns.

    Sources:
    Rank Math Sitemap Issues and Their Fixes » Rank Math
    How to Fix “Incorrect HTTP Header Content-Type” Error in Sitemaps » Rank Math

    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.

    Anonymous
    Rank Math free

    Hello,

    I have updated the sensitive data as requested. Can you please check further?

    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 ‘Problem With Sitemap (Rank Math Free)’ is closed to new replies.