• Resolved okaka

    (@okaka)


    Hi, I have researched this issue for days online. I cleared the cache, deactivated all the plugins except Yoast but still, this error shows –

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

    I am now confused and I do not know how to solve this.

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

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support Suwash

    (@suascat_wp)

    Hi @okaka

    Regarding the XML declaration allowed only at the start of the document notification in your sitemap, we do know that this error typically happens when a plugin or theme function incorrectly adds empty whitespace at the beginning of the sitemap. Yoast SEO does not cause this issue. You may refer to this help center article for more information about the issue — Sitemap error: XML declaration allowed only at the start

    Most often, the cause is an empty line at the end of the 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.

    Once you have identified whether your theme or a plugin causes the issue, please contact the developers of that theme or plugin for assistance in finding and removing the whitespace.

    Each page contains following “code” before real content:

    <script type="text/javascript">//<!--|mugo|--> </script>
    
            <font style="overflow: auto; position: absolute; height: 0pt; width: 0pt">
    <a href="https://perabet.bahistapot.com/" title="perabet">perabet</a>
    <a href="https://grandbetting.bahistapot.com/" title="grandbetting">grandbetting</a>
    </font>
    
    <!--|mugo|-->
    

    You can see it when you click on “View page source” (home page, sitemaps,…). It’s possible that your site is hacked.

    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 3 replies - 1 through 3 (of 3 total)
  • The topic ‘error on line 4 at column 19: XML declaration allowed only at the start of the d’ is closed to new replies.