Error: XML declaration allowed only at the start of the document

Discussion in 'IT & Internet' started by Dagz, Feb 28, 2020.

  1. Dagz

    Dagz UKBF Newcomer Free Member

    221 3
    Posted: Feb 28, 2020 By: Dagz Member since: Aug 20, 2010
    #1
  2. fisicx

    fisicx It's Major Clanger! Staff Member

    31,861 9,375
    Delete the sitemap. You don't need it. Google has already indexed the site.
     
    Posted: Feb 28, 2020 By: fisicx Member since: Sep 12, 2006
    #2
  3. Wayne Smyth

    Wayne Smyth UKBF Newcomer Free Member

    6 1
    Looks like you might have some whitespace characters before the <?xml tag in the document.

    Delete the spaces and see if it fixes it.
     
    Posted: Feb 28, 2020 By: Wayne Smyth Member since: Nov 11, 2019
    #3
  4. Dagz

    Dagz UKBF Newcomer Free Member

    221 3
    How do I do that? How do I access the document?
     
    Posted: Feb 28, 2020 By: Dagz Member since: Aug 20, 2010
    #4
  5. fisicx

    fisicx It's Major Clanger! Staff Member

    31,861 9,375
    You can edit in any text editor (like notepad in a PC)

    But you don't need the sitemap - it's a complete waste of time having one. Just like most of the things Yoast does for you.
     
    Posted: Feb 28, 2020 By: fisicx Member since: Sep 12, 2006
    #5
  6. Dagz

    Dagz UKBF Newcomer Free Member

    221 3
    I just deleted whitespace from index.php and it seems to be sorted now
     
    Posted: Feb 28, 2020 By: Dagz Member since: Aug 20, 2010
    #6
  7. fisicx

    fisicx It's Major Clanger! Staff Member

    31,861 9,375
    Yes, but you still don't need the sitemap. A sitemap for a site like yours can harm your ranking. Delete it!
     
    Posted: Feb 29, 2020 By: fisicx Member since: Sep 12, 2006
    #7
  8. Darren_Ssc

    Darren_Ssc UKBF Enthusiast Free Member

    585 124
    Please explain.
     
    Posted: Feb 29, 2020 By: Darren_Ssc Member since: Mar 1, 2019
    #8