Search engines will most likely ignore canonical tags if they’re placed outside of the <head> section.
Here's how to add them to your page appropriately.
The <link rel=“canonical”> only works appropriately if it’s within the <head> section of a page.
Otherwise, the search engine will ignore it, and your duplicate content issues will continue.
In order to solve this issue, fix the page template or HTML so that the canonical tag is between the opening and closing <head> tag.
This involves deleting the old canonical and re-adding it appropriately. Then, Google should be able to read the tag and follow the directive.
You can tell your dev team about this issue to get your project into the dev queue, or you can expedite your timeline and execute with a few steps.
Here’s how.
You can delete extra canonical tags at scale with a few steps with an SEO execution platform.
Here’s a quick workflow using seoClarity’s ClarityAutomate.
In this example we’re looking to delete multiple canonical tags, so we start by selecting “Canonical Tag” in ClarityAutomate.
This is where you specify that you want to delete the canonical tag.
This is where you set the XPath of the <link rel="canonical"> on the page that you need to remove.
A simple 3-step process will add the canonical tag in the <head> section.
This follows the same process as step #1 above — since we’re adding in a canonical tag, all you have to do is select “Canonical Tag” in ClarityAutomate.
In this case, we want to add a new canonical tag to the page.
Enter the hyperlink of the new canonical URL.