0

I have a sitemapindex file with sitemap and loc elements.

Can I add hreflang attribute to this file, is that logical? Because sitemapindex contains only URLs to other sitemaps.

<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xhtml="http://www.w3.org/1999/xhtml">
    <sitemap>
        <loc>domain/en/sitemap-general.xml</loc>
    </sitemap>
    <sitemap>
        <loc>domain/en/sitemap-categories.xml</loc>
    </sitemap>
    <sitemap>
        <loc>domain/en/sitemap-brands.xml</loc>
    </sitemap>
    <sitemap>
        <loc>domain/en/sitemap-products-1.xml</loc>
    </sitemap>
    <sitemap>
        <loc>domain/en/sitemap-products-2.xml</loc>
    </sitemap>
    <sitemap>
        <loc>
            domain/en/sitemap-products-images-1.xml
        </loc>
    </sitemap>
    <sitemap>
        <loc>
            domain/en/sitemap-products-images-2.xml
        </loc>
    </sitemap>
</sitemapindex>
Machavity
  • 30,841
  • 27
  • 92
  • 100
  • What do you think it means? Why do you want to do this? – unor May 10 '19 at 13:49
  • I have a task to add **hreflang** to ALL sitemaps but I don't know should I do that for index file :/ –  May 11 '19 at 08:45
  • I see. I would argue that *sitemap index* files aren’t *sitemaps*. -- Anyway, if you would add `hreflang` to the links in the sitemap index file, it would mean that the linked sitemap file is in that language -- something which is usually not useful to say, because a sitemap typically doesn’t contain content except URLs and language-agnostic metadata. – unor May 11 '19 at 13:03

0 Answers0