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.

0 views0 comments

Recent Posts

See All

CSS file size too large discovered in SEO audit

In our SEO audits at Loud Interactive, we often come across a common yet significant issue that can heavily impact your website's loading speed and overall performance: CSS file size too large. Let's

CSS file size too large discovered in SEO audit

When conducting an SEO audit on your site, one issue that might come up is that your CSS file size is too large. But why does this matter, and what can you do about it? Let's dive in. What's the Issue

H1 tag missing or empty" Discovered in an SEO Audit

At Loud Interactive, we've encountered a common issue during our SEO audits that can significantly impact a website's performance on search engines: the "H1 tag missing or empty" warning. This problem

bottom of page