top of page
  • Writer's pictureBrent D. Payne

Canonicalized URL in XML Sitemaps

When a URL in your XML Sitemap includes a canonical link pointing to a different URL, there is a conflict of interest for search engine indexing.


Why is this important?

Your XML Sitemap should feature only those URLs that you intend for search engines to crawl and index. A canonicalized URL signals to search engines that it should not be indexed; instead, indexing preference is given to the canonical URL. Thus, the presence of a canonicalized URL in a sitemap could confuse search engines, causing unexpected URLs to be indexed.


What does the Optimization check?

This Optimization is activated by any internal URL featuring a non-self-referential canonical link that is also listed in your XML Sitemap submissions.


Examples that trigger this Optimization:

Take for instance the URL https://example.com/page-a found in your sitemap submission.


This scenario would trigger the Optimization if the URL incorporates a canonical link pointing to a different URL:

<!doctype html><html lang="en"><head>  <title>Page Title</title>  <link rel="canonical" href="https://example.com/page-b" />  ...</head><body>...</body></html>


OR a canonical link in the <head> of the document pointing to an external URL:

<link rel="canonical" href="https://website.com/page-a" />


OR if the canonical tag is specified within the HTTP headers:

HTTP/... 200 OK...Link: <https://example.com/page-b>; rel="canonical"


How do you resolve this issue?

The current structure is potentially problematic for correct indexing by search engines.

  1. If the URL is intended to be canonicalized, then it should be excluded from XML Sitemaps. Proceed to remove the URL and resubmit the updated sitemap through Google Search Console.

  2. If the URL should not be canonicalized, it's imperative to eliminate the canonical link.

Further Reading

8 views

Comentarios


bottom of page