• Resolved adambak1986

    (@adambak1986)


    Hi, I noticed i have problem with sitemaps. Think this happened after update.

    Error:

    XML Parsing Error: XML or text declaration not at start of entity
    Location: https://pcsite.co.uk/sitemap_index.xml
    Line Number 4, Column 1:
    <?xml version=”1.0″ encoding=”UTF-8″?><?xml-stylesheet type=”text/xsl” href=”//pcsite.co.uk/main-sitemap.xsl”?>

    thanks

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hi @adambak1986,

    We checked the sitemap https://pcsite.co.uk/sitemap_index.xml and noticed the mentioned error.

    The error ‘XML declaration allowed only at the start of the document’ is most often caused when another plugin or theme adds code or white space to the beginning of the sitemap file. You will need to view the source code of the sitemap_index.xml document in order to confirm this and we have additional information on this and how to resolve this error at the following link: https://kb.yoast.com/kb/xml-sitemap-error/.

    Also, this issue can sometimes be caused by an empty line at the end of your theme’s functions.php file. If there is no empty line in this file, we highly recommend running a conflict check to identify what outputs the empty white space.

    Thread Starter adambak1986

    (@adambak1986)

    Thanks, is this affecting SEO?

    Hi,

    Yes it may affect SEO as Google has difficulty reading the sitemaps. However, we went to https://pcsite.co.uk/sitemap_index.xml and it now loads. See image: https://pasteboard.co/JlJES0V.png.

    If it is loading for you and you do not see the error, you may need to take some steps to get your sitemap right with Google again. We suggest the following actions:

    1. Clear all your caching from your theme, plugin, server, CDN like CloudFlare or browser. If you are not sure how to clear caching from theme/plugin please speak to those authors. If you want to clear cache from the server, please speak to your host provider. To clear the cache from a browser use this guide:?https://yoast.com/help/how-to-clear-my-browsers-cache/.

    2. Delete your sitemap in Google. Doing so will not hurt the SEO of the site. This guide explains more (scroll to the bottom):?https://support.google.com/webmasters/answer/183669?hl=en.

    3. Submit the sitemap again. Be sure to submit only sitemap_index.xml and nothing else.?This guide explains more:?https://yoast.com/help/submit-sitemap-search-engines/.

    4. Monitor the results to see if the issue resolves.

    Plugin Support devnihil

    (@devnihil)

    We are going ahead and marking this issue as resolved due to inactivity. If you require any further assistance please create a new issue.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘sitemap error’ is closed to new replies.