Core output, SEO plugin and theme head
Open the Canonical target and compare its current permalink with a saved SEO override. A renamed contribution can leave an old fixed value.
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.
How to fix the issue in WordPress
- Open the HTML head of a published post or page and locate rel=canonical. Identify whether it is generated by WordPress’s rel_canonical function, the active SEO plugin or a custom theme snippet. Adding a second tag to the header will not fix an incorrect plugin value.
- Replace the stored canonical with the intended, reachable primary URL. A self-reference may suit an independent source page; another page is not automatically an equivalent replacement.
Start with one affected page or template. Check its output before applying the correction to other pages.
Example of this specific finding
Illustrative control case: /article/? ref=mail refers via canonical to /alter-article/, the target answers with 404. The preferred address no longer contains the intended article.
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.
Determine the appropriate achievable goal and correct the canonical source. Then retrieve the source page and destination separately.
How to verify that the fix worked
The canonical target returns 200, contains the relevant content and is not excluded by noindex. Check a second page using the same template as well.
Check the canonical target: Compare the preferred URL with its HTTP status and indexability before changing a canonical rule.
Derogations and scope
Any achievable goal is not a substitute. If the article no longer exists, first clarify the publishing state instead of just the canonical field.
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: The preferred target must have the intended content