Knowledge Base - Resources - seoClarity

Canonical Tag Found Outside the Head Section

Written by Suraj Lalchandani | September 27, 2022

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. 

Table of Contents

 

Google Will Ignore Your Directive

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.

 

Adding Canonicals to the <head> Section

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.

 

Solving the Canonical Issue at Scale

How to Delete Canonical Tags

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.

1. Select what you'd like to optimize

In this example we’re looking to delete multiple canonical tags, so we start by selecting “Canonical Tag” in ClarityAutomate.

2. Choose how you'd like to optimize the canonical

This is where you specify that you want to delete the canonical tag.

3. Specify the XPath location

This is where you set the XPath of the <link rel="canonical"> on the page that you need to remove.

 

How to Add Canonical Tags in the <head> Section

A simple 3-step process will add the canonical tag in the <head> section.

1. Select what you’d like to optimize

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.

2. Choose how you’d like to optimize the canonical

In this case, we want to add a new canonical tag to the page.

3. New canonical URL

Enter the hyperlink of the new canonical URL.

 

Looking for other canonical issues?