Dealing with Indexability issues?

Crawl your website with Sitebulb for 300+ tech SEO checks

Try for Free
Medium This Hint is worth investigating further, and may warrant further attention depending on the type and quantity of URLs affected. Issue This Hint represents an error or problem that needs to be fixed.

Canonical is a relative URL

This means that the URL in question has a canonical element which uses a relative URL.

Why is this important?

Google state that one of the most common issues they see with canonicals come from the use of relative URLs.

The link tag accepts relative URLs, so it is actually valid HTML. However using them in canonicals can lead to other issues, such as the base URL being incorrectly defined, which would completely ruin your canonical set up.

The point of a canonical is to state precisely which URL is the preference, without ambiguity. This is best achieved by using absolute URLs for your canonical URLs.

What does the Hint check?

This Hint will trigger for any internal URL which contains a canonical link element that uses a relative URL as the canonical URL.

Examples that trigger this Hint:

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

The Hint would trigger for this URL if it had a canonical using a relative URL;

Canonical link in the <head> to a relative URL

<link rel="canonical" href="/page-b" />

OR HTTP Header canonical link to a relative URL

HTTP/... 200 OK

...
Link: <page-b>; rel="canonical"

How do you resolve this issue?

It is strongly recommended that all URLs are updated to use absolute URLs in canonicals. Often, this type of issue is controlled by particular rules or page templates, so it might be possible to solve this issue for all or lots of pages at once, with a few changes to the governing rules/templates.

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.