Mobile app version of vmapp.org
Login or Join
Shelton105

: On-page Markup and Sitemap Multi-language I have: example.com/en/product-a-en example.com/es/product-a-es example.com/ru/product-a-ru If i use this: On-page Markup Use the lang attribute in the html

@Shelton105

Posted in: #Google #Markup #Sitemap #Subdirectory

I have:


example.com/en/product-a-en
example.com/es/product-a-es
example.com/ru/product-a-ru


If i use this:

On-page Markup Use the lang attribute in the html tag: <html lang="en">

Use rel alternate links to the same page in other languages as suggested by Google:

<link rel="alternate" hreflang="en" href="http://www.example.com/en/product-a-en" />
<link rel="alternate" hreflang="es" href="http://www.example.com/es/product-a-es" />
<link rel="alternate" hreflang="ru" href="http://www.example.com/ru/product-a-ru" />

Should i send google sitemaps for each lang path example.com/lang-path? Or i just send english Sitemap subdirs (example.com/en/) and it will look at HTML and say, okey, it is multi-language and will make the sitemap for other languages alone?

I am asking because I have 17 languages and more than 2000 links.

Any idea how to make it best and easier way? Thanks.

10.02% popularity Vote Up Vote Down


Login to follow query

More posts by @Shelton105

2 Comments

Sorted by latest first Latest Oldest Best

 

@Si4351233

It's best to do it for every language. (see: hreflang: the ultimate guide on Yoast)

Here is a sitemap xml file for your example:

<url>
<loc>http://www.example.com/</loc>
<xhtml:link rel="alternate" hreflang="en" href="http://www.example.com/en/"/>
<xhtml:link rel="alternate" hreflang="es" href="http://www.example.com/es/"/>
<xhtml:link rel="alternate" hreflang="ru" href="http://www.example.com/ru/"/>
</url>
<url>
<loc>http://www.example.com/en/</loc>
<xhtml:link rel="alternate" hreflang="en" href="http://www.example.com/en/"/>
<xhtml:link rel="alternate" hreflang="es" href="http://www.example.com/es/"/>
<xhtml:link rel="alternate" hreflang="ru" href="http://www.example.com/ru/"/>
</url>
<url>
<loc>http://www.example.com/es/</loc>
<xhtml:link rel="alternate" hreflang="en" href="http://www.example.com/en/"/>
<xhtml:link rel="alternate" hreflang="es" href="http://www.example.com/es/"/>
<xhtml:link rel="alternate" hreflang="ru" href="http://www.example.com/ru/"/>
</url>
<url>
<loc>http://www.example.com/ru/</loc>
<xhtml:link rel="alternate" hreflang="en" href="http://www.example.com/en/"/>
<xhtml:<link rel="alternate" hreflang="es" href="http://www.example.com/es/"/>
<xhtml:link rel="alternate" hreflang="ru" href="http://www.example.com/ru/"/>
</url>
<url>
<loc>http://www.example.com/product</loc>
<xhtml:link rel="alternate" hreflang="en" href="http://www.example.com/en/product"/>
<xhtml:link rel="alternate" hreflang="es" href="http://www.example.com/es/product"/>
<xhtml:link rel="alternate" hreflang="ru" href="http://www.example.com/ru/product"/>
</url>
<url>
<loc>http://www.example.com/en/product</loc>
<xhtml:link rel="alternate" hreflang="en" href="http://www.example.com/en/product"/>
<xhtml:link rel="alternate" hreflang="es" href="http://www.example.com/es/product"/>
<xhtml:link rel="alternate" hreflang="ru" href="http://www.example.com/ru/product"/>
</url>
<url>
<loc>http://www.example.com/es/product</loc>
<xhtml:link rel="alternate" hreflang="en" href="http://www.example.com/en/product"/>
<xhtml:link rel="alternate" hreflang="es" href="http://www.example.com/es/product"/>
<xhtml:link rel="alternate" hreflang="ru" href="http://www.example.com/ru/product"/>
</url>
<url>
<loc>http://www.example.com/ru/product</loc>
<xhtml:link rel="alternate" hreflang="en" href="http://www.example.com/en/product"/>
<xhtml:link rel="alternate" hreflang="es" href="http://www.example.com/es/product"/>
<xhtml:link rel="alternate" hreflang="ru" href="http://www.example.com/ru/product"/>
</url>


If you want, you can add x-default for languages not covered by your site.

<xhtml:link rel="alternate" hreflang="x-default" hreflang="http://www.example.com/en/"/>


You have to add this to all pages (inside the url tags).

10% popularity Vote Up Vote Down


 

@Bryan171

The way I see it, sitemap.xml is used to tell robots what URLs you want them to crawl the most. It helps Googlebot and other crawlers navigate your site in the way you want them to. If your priority is to crawl and index your alternate language pages then adding them to your sitemap over only English pages will help prioritize their crawling.

If you do not add them to your sitemap, Google should be able to discover and crawl your language alternate pages, especially if they are linked to without the rel="nofollow" attribute.

But if your sitemap currently has all English language pages and you want your alternate language pages to be crawled more frequently, you should strongly consider adding them to your sitemap. Because if you don't, Googlebot and other crawlers might decide to prioritize your English pages in your sitemap over your alternate language pages.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme