Sitemap issue “error on line 2 at column 6”

#593543
  • Resolved Liam Quirk
    Rank Math free

    hi, I’m having issues with removing the line at the top of my sitemap:
    view-source:https://move-online.co.uk/sitemap_index.xml
    i have tried removing the line between the functions and wp-config.php file but the issue is still there. i have also deactivated plugin but the only one that seems to do anything is when i remove the rankmath plugin do you have any issue how i can resolve the issue

Viewing 1 replies (of 1 total)
  • Hello,

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

    This issue is caused by a blank line or space in your wp-config.php or functions.php file. If you’ve already removed the blank line from these files then please try to follow the steps below and see if that works for you:

    1. Flush the Sitemap cache by following this video screencast:
    https://i.rankmath.com/pipRDp

    2. Exclude the Sitemap files of the Rank Math plugin in your caching plugin. The cache could be via a plugin or from the server. For plugins or Cloudflare, please follow this article:
    https://rankmath.com/kb/exclude-sitemaps-from-caching/

    3. If the above steps don’t seem to work, kindly apply the following filter to your site.

    add_filter( 'rank_math/sitemap/enable_caching', '__return_false');
    

    Here’s how you can add filter/hook to your WordPress site:
    https://rankmath.com/kb/wordpress-hooks-actions-filters/

    If the issue still persists, then you can try to follow the steps from this guideline to resolve the issue: https://wejn.org/stuff/wejnswpwhitespacefix.php.html

    Let us know how it goes. Looking forward to helping you.

    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 ‘Sitemap issue “error on line 2 at column 6”’ is closed to new replies.