Can canonical tags be placed in the sitemap rather than in each page?

8,067

Solution 1

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)

Solution 2

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.

Solution 3

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.

Share:
8,067

Related videos on Youtube

SO User
Author by

SO User

Updated on September 18, 2022

Comments

  • SO User
    SO User almost 2 years

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

    If yes, how?

    • John Conde
      John Conde over 9 years
      That's because they go in the head of your document and not in the sitemap
    • SO User
      SO User over 9 years
      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?