Can I include canonical URLs in sitemap for SEO?

canonical-link, duplicates, seo, sitemap, url

Solution

You can include these two pages into your sitemap.xml and there won't be a problem for SEO because you're using the `rel="canonical"` tag. Indeed, when web crawlers will try to index the duplicate page, they will see the `rel="canonical"` tag and they will index the second page (the good one).

Problem

Can I include canonical URLs in sitemaps for SEO? For example `www.example.com/url.html` is a duplicate page of `www.example2.com/url.html`. So I used following tag in `www.example.com/url.html` page for SEO not to be penalized by search engines: ``` <link rel="canonical" href="www.example2.com/url.html"> ``` Now my question is can I display `www.example.com/url.html` URL inside of `www.example.com/sitemap.xml`? I already display `www.example2.com/url.html` URL inside of `www.example2.com/sitemap.xml`. Please suggest me what I have to do.

Original source