【发布时间】:2013-12-18 07:27:57
【问题描述】:
我的网站有超过 1 种语言,我会优化我的 sitemap.xml,使其包含所有可用的语言 - 我在 Google 网站管理员工具上找到 this guide 使用 XHTML 提供所有可用的 URL(一个用于每种语言),这会破坏 XML 文件,我已将属性更改为所描述的,但它仍然被破坏 - Chrome、Firefox 或 IE 无法正确读取文件。
这正常吗?
以下是 Google Webmaster Tools 提供的 sitemap.xml 示例:
<?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="en" href="http://www.example.com/english/"/>
<xhtml:link rel="alternate" hreflang="de-ch" href="http://www.example.com/schweiz-deutsch/"/>
<xhtml:link rel="alternate" hreflang="de" href="http://www.example.com/deutsch/"/>
</url>
<url>
<loc>http://www.example.com/schweiz-deutsch/</loc>
<xhtml:link rel="alternate" hreflang="de" href="http://www.example.com/deutsch/"/>
<xhtml:link rel="alternate" hreflang="en" href="http://www.example.com/english/"/>
<xhtml:link rel="alternate" hreflang="de-ch" href="http://www.example.com/schweiz-deutsch/"/>
</url>
</urlset>
【问题讨论】:
-
我也遇到了同样的问题,你解决了吗?
-
也有同样的问题:(
-
如何翻译您的网站,每种语言的页面?例如 index_fr.html 用于主页法语,index_nd.html 用于主页荷兰或您仅更改参数?
标签: xml xhtml sitemap multilingual sitemap.xml