Canonical not in the head: correct HTML structure
Canonical tags outside the head can be ignored or misinterpreted.
Canonical tags outside of the head can be ignored or misinterpreted canonical signals to help consolidate URL variants. It will be problematic if canonical, status code, robots and internal links suggest different goals.
Invalid HTML may terminate the head prematurely
A canonical can appear to be between head tags in the source code and still end up in the body in the parsed document. The cause may be an inadmissible element in front of it, through which the browser terminates the head prematurely. Therefore, compare raw response and DOM structure.
Example: Recognizing the Result
Illustrative example: A widget inserts a body element into the head before the canonical. The browser repairs the HTML and assigns subsequent elements differently.
Limit cause and implement correction
Remove the cause in the template and place exactly the intended canonical output in the valid head. Also check stored widgets or tracking snippets that output HTML there. After the change, the position should be correct without subsequent JavaScript repair. A pure search for the word “canonical” in the source code does not control this structure.
What makes you recognize a suitable correction
Check both original HTML source text and parsed DOM. Fix the invalid build on the causing component and output the canonical in the valid head.
Classification and boundaries
When is this indication not a clear error?
A pure source text search for the word canonical does not reliably detect this structural error.
Further documentation
Canonical not in head after CMS and cause
Many audit messages can be resolved faster if they are grouped by system, page type and technical cause. CMS indentations are only linked where Canonical does not have a clear cause or fixed route in the head in the respective system.
Frequent causes of this error
Related SEO Errors
Appropriate Seitenreport checks
This error should not be checked in isolation. The following tools and clusters help to narrow down the cause faster and to cleanly prioritize the affected URL groups.