Sitemap.xml Error: whitespace fix?

#383958
  • Resolved Joshua Larson
    Rank Math free

    Hi There,

    Our Google Search Console is returning the following error when attempting to access our Rank Math sitemap.xml file:

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

    We spoke to your support in the past but can’t seem to find the Ticket.

    The solution provided previously was to include “whitespacefix.php” in the root directory and make an update to index.php to talk to the whitespace fix file.

    It appears our index.php was updated during a typical wordpress upgrade.

    Is there another more stable solution that will not be overwritten when WordPress updates?

    Thank you

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

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

    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.

    Please do take a complete backup of your website before sharing the information with us.
    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.

    Hello,

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

    Thank you.

    Hello,

    I have added the code to your site’s index.php file and the sitemap is working fine now. You will have to go through your site’s files and find & remove that extra whitespace that is causing the issue to permanently fix this. Unfortunately, the only workaround is to add include("wejnswpwhitespacefix.php"); after the opening PHP tag of your index.php file and you will have to do it after every WP update.

    Hope this helps. Let us know if you need any other assistance.

    Hi Jaideep,

    Thank you for implementing this solution. We appreciate it!

    Hello,

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

    If you don’t mind us 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 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.

    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 5 replies - 1 through 5 (of 5 total)

The ticket ‘Sitemap.xml Error: whitespace fix?’ is closed to new replies.