6

I have www.example.it that support 2 language:

example.it/it => Italian language
example.it/en => English language

How can I set up the correct sitemap for the 2 version?

Stephen Ostermiller
  • 23,933
  • 14
  • 88
  • 109
michele
  • 26,348
  • 30
  • 111
  • 168
  • http://www.railshorde.com/blog/how-to-create-sitemap-for-multiple-language-site – Animesh Jun 16 '15 at 19:03
  • I voted to close this question because it is not a programming question and it is off-topic on Stack Overflow. Non-programming questions about your website should be asked on [webmasters.se]. In the future, please ask questions like this there. – Stephen Ostermiller Sep 27 '22 at 09:39

1 Answers1

12

Google have specifically answered this here:

http://googlewebmastercentral.blogspot.co.uk/2012/05/multilingual-and-multinational-site.html

For example:

<url>
  <loc>http://mysite.it/it</loc>
  <xhtml:link rel="alternate" hreflang="en" href="http://mysite.it/en" />
  <xhtml:link rel="alternate" hreflang="it" href="http://mysite.it/it" />
</url>

You will need to know the language or country code in order to be able to categorize other language types

http://webdesign.about.com/od/localization/l/bllanguagecodes.htm

Rashmi Pandit
  • 23,230
  • 17
  • 71
  • 111
jnelson
  • 421
  • 3
  • 12
  • 1
    jnelson, as per the GWT link, should there be two url tags for the above e.g. one with http://mysite.it/it and the other with http://mysite.it/en or just one is enough? – Rashmi Pandit May 30 '14 at 06:12
  • 1
    It looks that way, although it's not clear without the example. From [Google Support:](https://support.google.com/webmasters/answer/2620865?hl=en) You must create a separate url element for each URL. Each url element must include a loc tag indicating the page URLs, and an xhtml:link rel="alternate" hreflang="XX" subelement for every alternate version of the page, including itself. – Arjan Jul 01 '15 at 10:01