top of page
  • Writer's pictureBrent Payne

Canonical tag in HTML and HTTP header

The current URL has been identified as having a canonical tag present in both the HTML markup and the HTTP response headers.

Why is this important?

Employing just one method to express the canonical is considered the golden standard to minimize errors. Dual method usage makes it more susceptible to mistakes.

Consider you designate Page A's canonical to Page B in the HTML's <head> as well as in the HTTP headers. Time elapses, and now Page C emerges as Page A's new canonical target. You update the HTML's <head>, forgetting to adjust the HTTP headers.

This oversight could lead to conflicting canonicals, confusing search engines, and resulting in complete disregard for the canonicals—precipitating the Optimization: Mismatched canonical tag in HTML and HTTP header.

To avoid this, stick to a singular method for canonical declaration.

What does the Optimization check?

This Optimization will become active if an internal URL encases a canonical link element in the HTML and an HTTP header, irrespective of whether the URLs match or not.

Examples that trigger this Optimization:

This Optimization is activated in the case where canonicals are found in both the HTML and HTTP headers directing to identical or differing URLs;

Canonical in HTML <head>:

<link rel="canonical" href="" />

AND Canonical in HTTP Header:

HTTP/... 200 OK...Link: <>; rel="canonical"

Or Canonical in HTML <head>:

<link rel="canonical" href="" />

AND Canonical in HTTP Header to a different URL:

HTTP/... 200 OK...Link: <>; rel="canonical"

Why is this Optimization marked 'Potential Issue'?

This Optimization is labeled as a 'Potential Issue' due to its low impact at present, but potential to manifest into a problem later on. A single method for canonical definition is preferable to avoid future complications.

Stakeholders may require input from their developers to decide the most manageable method for their website's canonical definition.


Recent Posts

See All

ClubReq Gets A Link (Because They Asked)

I am a mentor for Techstars and have been for over 10 years. In those ten years I have mentioned to startups to ask ANYONE and everyone that they meet to link to their site. Yet, in all those times on


bottom of page