2

I have a website with multiple languages and version for different countries. However it is all using the same domain and segregated by locale query parameter. Examples as below:

  • example.com is the general domain
  • example.com?lang=ZH_SG (Chinese language users in Singapore)
  • example.com/?lang=en_SG (English language users in Singapore)
  • example.com/?lang=en_MY (English language users in Malaysia)
  • example.com/?lang=ms_MY (Malay language users in Malaysia)

As far as I understand it, you should include the locale query parameter in the sitemap. However what about the typical sitemap requirements like (lastmod, priority, changefreq)?

  1. Do you include lastmod, priority, changefreq in the hreflang sitemap together with the hreflang?
  2. If you do, do you place it before the hreflang? Any samples to refer to?

1 Answer 1

1
  1. lastmod, priority, changefreq can be omitted.

  2. Include your hreflang urls according to the following example:

    <?xml version="1.0" encoding="UTF-8"?> <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xhtml="http://www.w3.org/1999/xhtml"> <url> <loc>http://www.example.com/english/</loc> <xhtml:link rel="alternate" hreflang="de" href="http://www.example.com/deutsch/" /> <xhtml:link rel="alternate" hreflang="de-ch" href="http://www.example.com/schweiz-deutsch/" /> <xhtml:link rel="alternate" hreflang="en" href="http://www.example.com/english/" /> </url> <url> <loc>http://www.example.com/deutsch/</loc> <xhtml:link rel="alternate" hreflang="de-ch" href="http://www.example.com/schweiz-deutsch/" /> <xhtml:link rel="alternate" hreflang="en" href="http://www.example.com/english/" /> <xhtml:link rel="alternate" hreflang="de" href="http://www.example.com/deutsch/" /> </url> <loc>http://www.example.com/schweiz-deutsch/</loc> <xhtml:link rel="alternate" hreflang="en" href="http://www.example.com/english/" /> <xhtml:link rel="alternate" hreflang="de" href="http://www.example.com/deutsch/" /> <xhtml:link rel="alternate" hreflang="de-ch" href="http://www.example.com/schweiz-deutsch/" /> </url> </urlset>

Remember: every url must reference to each other.

2
  • Hey, thanks for the reply. What if i have a mobile version abc.com/m/ ? Do I need to include it inside my sitemap too?
    – Stan
    Dec 18, 2019 at 16:42
  • No, because a mobile version did on this way is duplicated content and should be deindexed. It isn't allowed to include deindexed pages into sitemap.
    – Evgeniy
    Dec 19, 2019 at 14:52

Your Answer

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

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