sitemap error

#311354
  • Resolved Ariel Dascalakis
    Rank Math free

    Hi!

    My sitemap shows the following error:

    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.

    How can i solve?

    Link: https://hoydia.com.ar/sitemap_index.xml

    Thanks

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

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

    I checked your sitemap and I am seeing the same error as well. That is usually due to extra whitespace at the end or beginning of the functions.php file on your theme or to some plugins.

    To troubleshoot this, you can try switching your theme to the default one and see if the issue goes away. You can also do the same with your plugins. You may follow this simple guide: https://rankmath.com/kb/check-plugin-conflicts/

    Only the site admin would know and your users won’t be affected by this troubleshooting.

    If the issue persists on your end, we might need to take a closer look at the settings. Please edit the first post on this ticket and include your WordPress & FTP logins in the designated Sensitive Data section.
    Sensitive Data Section

    It is completely secure and only our support staff has access to that section. If you want, you can use the below plugin to generate a temporary login URL to your website and share that with us instead:

    https://wordpress.org/plugins/temporary-login-without-password/

    You can use the above plugin in conjunction with the WP Security Audit Log to monitor what changes our staff might make on your website (if any):

    https://wordpress.org/plugins/wp-security-audit-log/

    We really look forward to helping you.

    Wow, I managed to fix the problem.

    I followed all the steps you gave me and was able to detect the plugin that was causing the conflict. The problem was solved.

    Thanks a lot. Your response was very positive and very kind.

    Greetings!!!

    PS: Sorry about my English. I use google translator.

    Hello,

    We are super happy that this resolved your issue. 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.

    Perfect! I already left my positive score!!

    One last question, Jeremy.

    I have noticed that my sitemap (and also the feed) shows only if the user logs in. The sitemap does not work with a closed session. The screen goes blank.

    I tried logging in as “guest” in Chrome browser and the same thing happens.

    It’s possible? Do you know how I could solve this problem?

    The links are:
    https://hoydia.com.ar/sitemap_index.xml
    https://hoydia.com.ar/feed/

    Thanks!

    Nigel
    Rank Math business

    Hello,

    I tested the sitemap using a sitemap validator and it showed some errors with your sitemap:

    I suspect there is a file in your WordPress setup that contains a blank space which can affect sitemap generation. Please follow our guide on how to troubleshoot and fix sitemap issues: https://rankmath.com/kb/fix-sitemap-issues/

    A similar issue could be affecting your RSS feed. so fixing the sitemap should fix that too.

    Hope that helps. Let us know if you have questions. We are here to help.

    Thanks, I have detected that the problem is in the plugin “WP Super Cache”. By disabling it, I can validate at https://www.xml-sitemaps.com/validate-xml-sitemap.html that the sitemap works. When you re-enable the plugin, the conflict reappears.

    The strange thing is that sometimes it works and sometimes it doesn’t (if I log into my website, the sitemap works fine).

    Anyway, Google Search Console tells me that it is crawling the sitemap fine:

    https://ibb.co/xYNYJRt

    So I suspect this won’t get me in trouble.

    Thank you very much for your reply.

    Hello,

    Glad that helped.

    In case that plugin is conflicting with your sitemap generation, you may need to exclude the Sitemap files of the Rank Math plugin in your caching plugin:
    https://rankmath.com/kb/exclude-sitemaps-from-caching/#wp-super-cache

    Meanwhile, please don’t hesitate to get in touch if you encounter any issues in your GSC with your sitemaps.

    Looking forward to helping you.

    Thank you.

    Notice: Trying to get property ‘labels’ of non-object in /home/u455383844/domains/liquimarcas.com/public_html/bucaramanga/wp-content/plugins/seo-by-rank-math/includes/opengraph/class-slack.php on line 304

    Error rank math

    https://bucaramanga.liquimarcas.com/Marca/alcatel/

    Hello,

    @freddy We have already replied to your other ticket. Please continue there so we can assist you accordingly.

    Looking forward to helping you.

    Thank you.

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

The ticket ‘sitemap error’ is closed to new replies.