Sitemaps seems not working well

#84366
  • Resolved Luiz G Sandrini
    Rank Math free

    Hi. When I try to see any sitemap, I receive this message:

    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.

    Is the sitemap working? How can I fix this issue?

    Thanks and regards.

Viewing 1 replies (of 1 total)
  • Hello,

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

    That is usually due to an extra whitespace at the end or beginning of the functions.php file on your theme or one of your plugin files.

    To find find the issue you have to find first the cause. You can do this by doing the following:

    1. Install and activate a default theme on the site. Clear your cache, resave your permalinks settings and check if the issue disappears from your sitemap.

    2. If the issue is not with your theme, you can reactivate your theme then go to plugins page. Deactivate the plugins one by one, while still checking your sitemap until you find the cause of the issue.

    If not the issue is not with either your theme or plugins, then it is likely coming from your wp configuration file(s)

    You can also try this guide here: https://wejn.org/stuff/wejnswpwhitespacefix.php.html to fix all whitesapces on your files.

    Hope that helps. If you have any further question(s), please let us know. 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 1 replies (of 1 total)

The ticket ‘Sitemaps seems not working well’ is closed to new replies.