Have a multilingual website

StevenTed

Newbie
Joined
Mar 13, 2024
Messages
43
Reaction score
10
Hello everyone, I have a multilingual website coded by my team. We are wondering how to design a sitemap properly.
Currently there are 2 options.
- The first is to create multiple sitemaps, one for each language. But I wonder if every time there is a new post, I have to update it manually?
- The second option is to use only one sitemap and use the "hreflang" tag. I did, but it doesn't seem to work
Here is the example I used:
<?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>https://name.com/refund-policy</loc>
<xhtml:link rel="alternate" hreflang="en" href="https://name.com/refund-policy"/>
<xhtml:link rel="alternate" hreflang="zh" href="https://name.com/zh/refund-policy"/>
<xhtml:link rel="alternate" hreflang="es" href="https://name.com/es/refund-policy"/>
<xhtml:link rel="alternate" hreflang="ru" href="https://name.com/ru/refund-policy"/>
<xhtml:link rel="alternate" hreflang="x-default" ref="https://name.com/en/refund-policy"/>
</url>
......
</urlset>
I need everyone's help. Thank
 
Sitemap index with a sitemap for each should work. Didnt catch the part of "update manually". Your cms should update everything automatically.
 
Hello everyone, I have a multilingual website coded by my team. We are wondering how to design a sitemap properly.
Currently there are 2 options.
- The first is to create multiple sitemaps, one for each language. But I wonder if every time there is a new post, I have to update it manually?
- The second option is to use only one sitemap and use the "hreflang" tag. I did, but it doesn't seem to work
Here is the example I used:
<?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>https://name.com/refund-policy</loc>
<xhtml:link rel="alternate" hreflang="en" href="https://name.com/refund-policy"/>
<xhtml:link rel="alternate" hreflang="zh" href="https://name.com/zh/refund-policy"/>
<xhtml:link rel="alternate" hreflang="es" href="https://name.com/es/refund-policy"/>
<xhtml:link rel="alternate" hreflang="ru" href="https://name.com/ru/refund-policy"/>
<xhtml:link rel="alternate" hreflang="x-default" ref="https://name.com/en/refund-policy"/>
</url>
......
</urlset>
I need everyone's help. Thank


you are on the right track using the hreflang tag but make sure to keep few things on your consideration like loc tags on the URLs format, verify implementations and monitor the changes when new content is added also I would prefer multiple sitemaps for better performance.
 
you are on the right track using the hreflang tag but make sure to keep few things on your consideration like loc tags on the URLs format, verify implementations and monitor the changes when new content is added also I would prefer multiple sitemaps for better performance.
So every time I have a new article, I will have to manually update this link in the sitemap?
 
Back
Top