Sitemap XML Parsing Error

#187823
  • Resolved Sall
    Rank Math free

    Hello,
    i have Divi Theme with WPML installed. When i check the Sitemap_index.xml i get the following error:

    XML Parsing Error: XML or text declaration not at start of entity
    Location: https://domain.com/sitemap_index.xml
    Line Number 3, Column 1:
    <?xml version=”1.0″ encoding=”UTF-8″?><?xml-stylesheet type=”text/xsl” href=”//domain.com/main-sitemap.xsl”?>
    ^

    Is this a know error with wpml? Never had this issue on my other website with one language.

    How to fix this?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Anas
    Rank Math business

    Hello,

    Thank you for contacting Rank Math, and sorry for any inconvenience caused.

    This error suggests that there must be some white spaces before the XML Sitemap’s source code.

    This might be added by a blank line/space in your wp-config.php file or your theme’s functions.php file. If there is no such blank space in your wp-config.php or functions.php file, check for a plugin conflict using the Health Check plugin.

    Also, make sure your cache is disabled as it is highly likely that the cache is interfering with the working of Sitemap functionality of Rank Math.

    I hope this helps. Looking forward to helping you.

    Sall
    Rank Math free

    Hi Anas,

    thanks for your reply. Disabled all Plugins, no caching plugin installed.

    Seems there was a space somewhere in the functions.php.

    Now its working:)

    Thanks
    best regards
    Sally

    Anas
    Rank Math business

    Hello,

    We are super happy that your issue is resolved. If you have any other questions in the future, know that we are here to help you.

    If you don’t mind me asking, could you please leave us a review (if you haven’t already) on https://wordpress.org/support/plugin/seo-by-rank-math/reviews/#new-post about your overall experience with Rank Math? We appreciate your time and patience.

    If you do have another question in the future, please feel free to create a new forum topic, and it will be our pleasure to assist you again.

    Thank you.

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

The ticket ‘Sitemap XML Parsing Error’ is closed to new replies.