多语言站点的站点地图

时间:2018-11-22 11:04:59

标签: sitemap hreflang

我想为我的多语言站点制作一个站点地图。

一个问题是;如果我这样使用hreflang:

<url>
    <loc>https://www.example.com/</loc>
    <xhtml:link rel="alternate" hreflang="en" href="http://www.example.com/en/" />
    <xhtml:link rel="alternate" hreflang="ru" href="http://www.example.com/ru/" />
    <changefreq>daily</changefreq>
    <priority>0.9</priority>
</url>

我也必须添加其他语言的对应语言吗?

<url>
     <loc>https://www.example.com/</loc>
     <xhtml:link rel="alternate" hreflang="en" href="http://www.example.com/en/" />
     <xhtml:link rel="alternate" hreflang="ru" href="http://www.example.com/ru/" />
     <changefreq>daily</changefreq>
     <priority>0.9</priority>
</url>    
<url>
     <loc>https://www.example.com/ru/</loc>
     <xhtml:link rel="alternate" hreflang="en" href="http://www.example.com/en/" />
     <xhtml:link rel="alternate" hreflang="ru" href="http://www.example.com/ru/" />
     <changefreq>daily</changefreq>
     <priority>0.9</priority>
</url>

哪个是最好的?

我也正在为我的产品插入图像,如下所示:

<url>
     <loc>https://www.example.com/en/clothing/product.html</loc>
     <changefreq>daily</changefreq>
     <priority>0.7</priority>
     <image:image>
          <image:loc>https://www.example.com/images/image1.jpg</image:loc>
          <image:title>Product Image</image:title>
     </image:image>
     <image:image>
          <image:loc>https://www.example.com/images/image2.jpg</image:loc>
          <image:title>Product Image</image:title>
     </image:image>
</url>

每种语言的产品我都有相同的照片。我必须再次为其他语言添加图像吗?

<url>
     <loc>https://www.example.com/en/clothing/product.html</loc>
     <changefreq>daily</changefreq>
     <priority>0.7</priority>
     <image:image>
          <image:loc>https://www.example.com/images/image1.jpg</image:loc>
          <image:title>Product Image</image:title>
     </image:image>
     <image:image>
          <image:loc>https://www.example.com/images/image2.jpg</image:loc>
          <image:title>Product Image</image:title>
      </image:image>
</url>
<url>
    <loc>https://www.example.com/ru/clothing/product.html</loc>
    <changefreq>daily</changefreq>
    <priority>0.7</priority>
    <image:image>
         <image:loc>https://www.example.com/images/image1.jpg</image:loc>
         <image:title>Product Image</image:title>
    </image:image>
    <image:image>
         <image:loc>https://www.example.com/images/image2.jpg</image:loc>
         <image:title>Product Image</image:title>
     </image:image>
</url>

哪个是正确的?

0 个答案:

没有答案