Sitemap для мультиязычного сайта - PullRequest
0 голосов
/ 22 ноября 2018

Я хочу создать карту сайта для моего мультиязычного сайта.

Вопрос в том,если я использую 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>

Какой из них правильный?

...