• Hi there,

    This week I got some errors showing up in my search console out of the blue that say:
    “Tag found outside the document head which is only allowed as a direct child of the document head.”

    Yesterday it found 6, and now today it’s affecting 12 of my pages thus far.

    Here is an example of one the pages it is finding the errors:
    https://cheapandcheeky.com/greasy-hair/amp/

    And the search console instance is pulling up this (1/33 instances on the page):

    <noscript>Dyeing your hair temporarily helps greasy hair. But it's not a permanent fix.</noscript></noscript></amp-img><p id=”caption-attachment-773″ class=”wp-caption-text”>Dyeing your hair temporarily helps greasy hair. But it’s not a permanent fix.</p></div>

    I haven’t changed anything so I don’t know why it’s doing this all of a sudden.

    I have no idea where to go to fix the code and even if I did know where to find it, I probably wouldn’t have a clue what I’m doing. I’m just a blogger with limited knowledge of basic HTML. I try to avoid touching anything with a CSS, JS, or PHP attached to it. Can you please help?

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

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter missfrosty1

    (@missfrosty1)

    Ok weird, it just inserted the picture without all the code. Hope you are still able to get what I’m saying.

    See, I told you I suck!

    @missfrosty1 Looking at your AMP pages I can see nested images within the noscript tags, see below. This is resulting in validation errors.

    <noscript><img ...> 
     <noscript><img ...></noscript>
        </noscript>

    What image optimization plugins are you using? Can you try and disable them one by one and see if you encounter the same issue?

    Thread Starter missfrosty1

    (@missfrosty1)

    Hi James,

    I disabled all of my plugins and it still wouldn’t let me complete the validation process because 3 pages immediately failed. I don’t know what happened to cause those errors in the first place. But I just disabled AMP and now it’s validating again. I’m currently waiting for it to complete the validation and will report back.

    If you want to let me know what image optimisation plugins you are using I can also check from my side

    Thread Starter missfrosty1

    (@missfrosty1)

    Hi James,

    I have a few. I use Smush to compress and lazy load, and Jetpack as a CDN. I also use Hummingbird and Speedbooster for optimizing the site. Right now I have AMP turned off. Please let me know how to proceed.

    • This reply was modified 5 years, 2 months ago by missfrosty1.

    @missfrosty1 Can you try enabling AMP again and then disabling the plugins you mentioned one by one to check? Out of the few you mentioned there could be some options conflicting.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Tag found outside the document head error’ is closed to new replies.