Issues

Canonicals: Invalid Attribute In Annotation

back to issues overview

Invalid Attribute In Annotation

Pages with a rel=”canonical” annotation that includes an alternate version using an hreflang, lang, media, or type attribute.

Adding certain attributes to the link element changes the meaning of the annotation to denote a different device or language version. These annotations are ignored and not used for canonicalisation by Google.

How to Analyse in the SEO Spider

View URLs with this issue in the ‘Canonicals’ tab and ‘Ignored Due To Alternate In Annotation’ filter, and export all URLs using the ‘Export’ button.

Read our tutorial on ‘How To Audit Canonicals‘.

What Triggers This Issue

This issue is triggered when URLs include rel=”canonical” annotations with hreflang, lang, media, and type attributes.

For example:

https://www.screamingfrog.co.uk/

Has the canonical:

<link rel="canonical" href="https://www.screamingfrog.co.uk/" rel="alternate" hreflang="en-gb">

The ‘rel=”alternate”‘ and ‘hreflang=”en-gb”‘ should obviously not be in the canonical annotation. It should be:

<link rel="canonical" href="https://www.screamingfrog.co.uk/">

How To Fix

Use separate appropriate link annotations to specify alternate versions of a page.

Google supports explicit rel canonical link annotations and they should not contain hreflang, lang, media, and type attributes.

Back to top