We have canonical tags spread across our web pages. Is it possible to add the canonical tags in our sitemap instead?

If yes, how?

  • 1
    That's because they go in the head of your document and not in the sitemap – John Conde Dec 11 '14 at 0:22
  • Thanks @JohnConde. We are using hreflang tags in the sitemaps. I thought it would also be possible to include the canonical tags. Is it not allowed? – SO User Dec 11 '14 at 0:24

Just the fact that a URL is in the sitemap means that Google is likely to view it as the canonical page. In your sitemap, include only the canonical URL but not the non-canonical versions.

Source: The Sitemap Paradox where Google's John Mueller discusses what Sitemaps are good for and says:

Recognizing preferred URLs for canonicalization (there are other ways to handle canonicalization too)

| improve this answer | |

No. That is not what the sitemap is designed for.

I agree that it would be nice if we could communicate more through the sitemap and that the current function of the sitemap could be extended to be more helpful for both the webmaster and the search engines.

That being what it may, you use the site map to tell search engines what pages you want indexed. Search engines will continue to index pages it finds on it's own that are not listed within the sitemap. If you want a page to be excluded from the search engine index, you can use the robots.txt file.

Here is the sitemap protocol: http://www.sitemaps.org/protocol.html

You can extend the sitemap protocol by using your own namespace, however, search engines are not expecting this and there is no additional standards that I am aware of that search engines will understand.

| improve this answer | |

According to https://developers.google.com/webmasters/mobile-sites/mobile-seo/configurations/separate-urls, we need to add rel=alternate to our sitemap and rel=canonical to the corresponding page on the site.

| improve this answer | |

1) If a link is in a sitemap it means you want search engines to find and index the page.

2) "rel=canonical" means you do not want search engin to index this page but to index the specified canonical page. So these URL should not be in the sitemap.

3) "rel=alternate" is used to specify an alternate language. You want search engines to find and index all languages. These page should not specify a canonical link.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.