我有一个网站,有超过1种语言,我会优化我的sitemap.xml,因此它将包括所有可用的语言 - 我在Google网站站长工具上找到this guide使用XHTML提供所有可用的URL(每种语言一个),这个打破XML文件,我已经将属性更改为如上所述,但它仍然被破坏 - 不是Chrome,Firefox或IE能够正确读取文件。
这是正常的吗?
以下是Google网站站长工具提供的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>
只要谷歌搜索控制台在发现它时(或提交时)没有抱怨你的sitemap.xml
,这里就没有真正的搜索引擎优化问题。