Free Webinar: Website Migrations & Redirect Mapping Dos & Don’ts Sign up now!

Dealing with Indexability issues?

Crawl your website with Sitebulb for 300+ tech SEO checks

Try for Free
High This Hint is very important, and definitely warrants attention. Potential Issue This Hint is unlikely to be affecting the site at the moment, but should be investigated as it could cause issues in the future.

Canonical contains superfluous HTML attributes

This means that the URL in question specifies a canonical element that contains attributes other than rel and href.

Why is this important?

Canonical annotations are meant to help search engines determine what page is canonical when a set of duplicates exists. When properly implemented, search engines will only index the canonical URL.

Attributes other than rel and href in canonical elements are ignored by Google. Canonical tags should only include relevant attributes, to ensure an effective indexing strategy.

Specific attributes that do lead to the whole canonical tag being dismissed are flagged up by the hint 'Canonical contains invalid HTML attributes.'

What does the Hint check?

The hint will trigger for any URL that specifies a canonical link element containing HTML attributes that will cause the canonical annotation to be ignored, specifically hreflang, lang, media, or type.

This hint will trigger for any URL with canonical link elements containing anything other than rel='canonical' and href='URL' attributes. According to a study by Merj, the most common superfluous attributes in canonical tags are:

  • data-react-helmet
  • itemprop
  • data-n-head
  • data-rh
  • id
  • data-senna-track
  • data-hid
  • data-baseprotocol
  • data-basehost
  • class

Examples that trigger this Hint:

Consider the URL: https://example.com/page-a

The Hint would trigger for this URL if it the rel="canonical" tag contained the data-testid attribute:

<head>
<title>Canonical Research</title>
<link rel="canonical" href="https://example.com/page-b" data-testid="true"/>

...
</head>

Why is this Hint marked 'Potential Issue'?

This Hint is classified as a 'Potential Issue', since most attributes won't stop search engines from recognizing canonical link tags.

To adhere to best practice, simplify your canonical link tags, avoiding any unnecessary attributes.

If your canonical tag contains additional attributes, regularly verify the effectiveness of your tags using Google Search Console or Bing's Webmaster Tools.

Further Reading

Sitebulb Desktop

Find, fix and communicate technical issues with easy visuals, in-depth insights, & prioritized recommendations across 300+ SEO issues.

  • Ideal for SEO professionals, consultants & marketing agencies.

Sitebulb Cloud

Get all the capability of Sitebulb Desktop, accessible via your web browser. Crawl at scale without project, crawl credit, or machine limits.

  • Perfect for collaboration, remote teams & extreme scale.