Seitenreport Seitenreport
Canonical in WordPress

Canonical Not Fixed in Head in WordPress

Invalid HTML can terminate the head prematurely. In WordPress, you check for core output, SEO plugin and theme head.

Core output, SEO plugin and theme head

A canonical from an HTML content block ends up in the page body. Remove this output there and use the head output provided for it.

On a single content page, check if WordPress Core, SEO plugin, and theme each output canonicals. For archives, a different logic may apply than for contributions. Do not blindly remove the core function, but first determine the leading source.

Where to check the setting in WordPress

Open the head of a published single view and search for rel=canonical. Assign the output to the core call rel_canonical, the active SEO plugin or your own theme snippet. A second manual output in the header does not fix an incorrect plugin value.

Example of this specific finding

Illustrative control case: A widget inserts a body element into the head before the canonical. The browser repairs the HTML and assigns subsequent elements differently.

follow-up audit in WordPress

Compare a post, a static page and an archive. The additional tag comes from a theme snippet, the change of which is first checked in a test environment.

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.

Derogations and scope

A pure source text search for the word canonical does not reliably detect this structural error.

Related: WordPress with classic or block theme. SEO plugins and page builders are different; there is no universal menu path for all installations.

Classify the general error

Definition, system-independent causes and further correction examples: Invalid HTML may terminate the head prematurely

Configuration and test signal documentation

WordPress: Canonical edition rel_canonical

Google: Canonical Goals and Conflicting Signals

Related Canonical Errors in WordPress