In instances where a website's URL is set to canonicalize to another URL, which in turn canonicalizes back to the original URL (think of Page A pointing to Page B, and Page B pointing back to Page A), the issue at hand is termed a 'Canonical loop'.
Why is this important?
Setting a canonical URL is meant to clearly determine which URL should be seen as the master version. When you fall into a canonical loop, you inadvertently send mixed signals to search engines. This often results in the search engines disregarding your canonical tags and choosing a canonical URL themselves.
Consequently, this confusion can prompt the indexing of incorrect URLs, which may cause problems with duplicate content on your website.
What does the Optimization check?
This Optimization will activate when an internal URL possesses a canonical link element, pointing to another URL that subsequently points back to the initial URL.
Examples that trigger this Optimization:
Take, for example, the URL: https://example.com/page-a
A canonical loop Optimization would be triggered if this URL had a canonical link such as:
<link rel="canonical" href="https://example.com/page-b" />
and the page at https://example.com/page-b contained a canonical link pointing back to the first URL:
<link rel="canonical" href="https://example.com/page-a" />
This issue may also occur if canonical URLs are defined using HTTP headers, or through a combination of both headers and HTML.
How do you resolve this issue?
To resolve a canonical loop, you'll need to pinpoint the correct canonical URL for each page involved. Once determined, the canonicals should be updated to be self-referential to their respective correct pages.
Addressing these conflicts typically requires an examination on a case-by-case basis, taking into account the purpose and content of each page.