Site map error.

  • We receive the following error when trying to view the sitemap page.

    “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.”

    Viewing the source shows the first line of the xml file is empty.

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

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

    This issue suggests that there is some white space before the opening PHP tag on your page templates. I have checked and there is some white space on 404.php but unfortunately I could not edit your files because of some communications issues with your server. Please remove the white space by editing the files via FTP. You can also go ahead and check if there is similar white space on wp-config.php file on the root of your site.

    I hope this info helps. Thank you.


    Hi Michael,

    We have attempted to remove the white space on 404.php. The error has now changed to:
    XML Parsing Error: XML or text declaration not at start of entity
    Line Number 2, Column 1:<?xml version=”1.0″ encoding=”UTF-8″?><xsl:stylesheet version=”2.0″

    Please advise what can be done.

    Hi there,

    Thanks for the follow up.

    It is likely that there is still some additional white spaces on your theme files. Please share some temporary FTP access so that I can help in checking this.

    I am looking forward to helping you. Thank you.


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

The ticket ‘Site map error.’ is closed to new replies.