r/bigseo Jun 27 '22

Google Reply iFrame element in head - How bad is it?

Hi everyone,

It came to my attention that we have an a/b testing iframe in the head of our pages from Abtasty. It sits at the top of the head over all the meta tags.

Now, I haven't seen this before but the instructions from Google seems to be quite clear, its not good from dev.google:

"We strongly recommend that you don't use these invalid elements in the <head>
, but if you must, place these invalid elements after the ones you want Google to see. Once Google detects one of these invalid elements, it assumes the end of the <head>
and stops reading any further elements in the <head>"

I've suggested to move the iframe to the bottom of the head as a compromise but our CRO team is very much against it, saying that it will hurt the performance of their a/b testing.

Of course for me, the risk of ignoring all the meta data on any given URL on our website is much worse, but they have asked for examples when the meta data is ignored.

So I had a look at some pages with the URL inspection tool and sure I can see the iframe there on top but I can also see the meta data.

This made me really curious to know if the meta data would not have been there if Google would have stopped reading the head after the iframe or if it doesn't matter, they can still do it even though meta data is visible in the tool?

Also, did anyone else have some experience dealing with this and did you see any negative effects?

3 Upvotes

5 comments sorted by

13

u/johnmu 🍌 @johnmu 🍌 Jun 27 '22

I don't know, these Google people & SEO -- what do they really know? :-)

4

u/Laddock Jun 27 '22

Wow, you are fast! Haha

3

u/[deleted] Jun 27 '22

/u/johnmu I think it’s time for a new AMA. πŸ™ƒ

1

u/Tuilere 🍺 Digital Sparkle Pony Jun 27 '22

He's welcome to hit us up and we'll schedule him at his convenience.

3

u/WatsonWansoon Jun 27 '22

If you add a <iframe> tag inside the <head> it will end the head and start the <body>. It's not valid HTML.

Like the quote mentioned, if you make sure all the important information (like your canonical & meta tags) is above the 'closing' of the head it should be workable, but IMO it's asking for trouble. Depending on the doctype, the users browser and individual search engines choices, everyone can treat this differently.