HTML validation · Head element

SEO tags placed after scripts in the head

A script comes before the title, meta description and canonical in the head, so a problem with it could push those tags out.

How this page is built

In the head of this page, a small inline script comes before the title, meta description and canonical. Every other page on the site puts those tags before any script.

Why it matters

Scripts in the head, especially third-party tags, can write or inject elements that close the head early. Anything after that point may be treated as body content.

When the title, meta robots, canonical and hreflang come first, nothing a script does can push them out of the head.

How to check it

View the source and note the order of elements in the head. Crawl tools that check head order report SEO tags that come after scripts.

How to fix it

Order the head with the charset and viewport first, then the title, meta description, robots, canonical and hreflang, and only then stylesheets, scripts and third-party tags.

Back to all tests