Yoast SEO
[resolved] [Plugin: WordPress SEO by Yoast] XML Parsing Error: XML or text declaration not at start of entity (3 posts)

  1. w3dgie
    Posted 3 years ago #

    WordPress SEO v1.2.8.5

    Upon navigating to domain.com/sitemap_index.xml:

    XML Parsing Error: XML or text declaration not at start of entity
    Location: http://domain.com/sitemap_index.xml
    Line Number 1, Column 9:

    <?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet type="text/xsl" href="http://domain.com/wp-content/plugins/wordpress-seo/css/xml-sitemap-xsl.php"?>

    When viewing the source of domain.com/sitemap_index.xml There are a ton of extra spaces in front of line 1.


  2. w3dgie
    Posted 3 years ago #

    Solution: Few of my required plugin files had extraneous spaces after the closing PHP tag. Make sure there are no spaces after closing PHP tags.

  3. rolfsmeets
    Posted 3 years ago #

    I also get this error (in Dutch)
    There are no spaces in the php file!
    What to do.

    rolf smeets

    XML-parsefout: onjuist gevormd
    Locatie: http://ecopic.nl/wpr/sitemap_index.xml
    Regelnummer 1, kolom 2:
    <?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet type="text/xsl" href="http://ecopic.nl/wpr/wp-content/plugins/wordpress-seo/css/xml-sitemap-xsl.php"?>

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Yoast SEO
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic