1

Hy,

I have a site with three languages:

  • example.com/hu
  • example.com/en
  • example.com/de

I've read that I can add alternate languages in one sitemap for each pages like that:

<url>
    <loc>http://www.example.com/hu/page1/</loc>
    <xhtml:link 
           rel="alternate"
           hreflang="en"
           href="http://www.example.com/en/page1/"
    />
    <xhtml:link 
           rel="alternate"
           hreflang="de"
           href="http://www.example.com/de/page1/"
    />

Or I should create multiple sitemaps for each languages and collect them in one sitemap like that:

<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
    <sitemap>
        <loc>http://www.example.com/sitemap_hu.xml</loc>
        <lastmod>2005-01-01</lastmod>
    </sitemap>
    <sitemap>
        <loc>http://www.example.com/sitemap_en.xml</loc>
        <lastmod>2005-01-01</lastmod>
    </sitemap>
    <sitemap>
        <loc>http://www.example.com/sitemap_de.xml</loc>
        <lastmod>2005-01-01</lastmod>
    </sitemap>
</sitemapindex>

Which one is better? Or are they all the same?

Thanks, Dave.

0

1 Answer 1

1

Go with your first sitemap, since your second example does not tell anything to google that, this is another alternative url on different language. People use second sitemap example, when their sitemap is big and need to divide into sub parts.

First is right, second is wrong for multilangual site.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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