我最近上传了一个站点地图文件到,但是他们告诉我,它可以被读取,但是带有名称空间和名称空间前缀的错误。
这是我的sitemap (https://bizibuz.com/sitemap.xml)及其结构
<?xml version="1.0" encoding="UTF-8"?>
<urlset
xmlns="https://www.sitemaps.org/schemas/sitemap/0.9"
xmlns:xhtml="https://www.w3.org/1999/xhtml/"
xmlns:xsi="https://www.w3.org/2001/XMLSchema-instance">
<url>
<loc>https://www.bizibuz.com/</loc>
<xhtml:link
rel="alternate"
hreflang="en"
href="https://www.bizibuz.com/" />
<xhtml:link
rel="alternate"
hreflang="zh-Hant"
href="https://www.bizibuz.com/zh/" />
</url>
...
<url>
<loc>https://www.bizibuz.com/preprimary-knowyourchild</loc>
<xhtml:link
rel="alternate"
hreflang="en"
href="https://www.bizibuz.com/preprimary-knowyourchild" />
<xhtml:link
rel="alternate"
hreflang="zh-Hant"
href="https://www.bizibuz.com/zh/preprimary-knowyourchild" />
<video:video>
<video:title>Pre-primary KnowYourChild™ Tools</video:title>
<video:content_loc>https://bizibuz-web-dev.s3.ap-southeast-1.amazonaws.com/static/videos/Bizibuz KYC - pre primary 4_3.mp4</video:content_loc>
</video:video>
<video:video>
<video:title>KnowYourChild™學前評估工具</video:title>
<video:content_loc>https://bizibuz-web-dev.s3.ap-southeast-1.amazonaws.com/static/videos/Bizibuz KYC - pre primary 4_3 - cn.mp4</video:content_loc>
</video:video>
</url>
...
</urlset>
错误的细节是
Your Sitemap or Sitemap index file doesn't properly declare the namespace.
The XML Sitemap cannot be parsed because it contains one or more unbound namespace prefixes. For example, this error is generated when <xhtml:link> is found in a Sitemap without prior xmlns:xhtml="http://www.w3.org/1999/xhtml".
error on line 41 at column 19: Namespace prefix video on video is not defined
error on line 42 at column 22: Namespace prefix video on title is not defined
error on line 43 at column 28: Namespace prefix video on content_loc is not defined
error on line 45 at column 19: Namespace prefix video on video is not defined
error on line 46 at column 22: Namespace prefix video on title is not defined
error on line 47 at column 28: Namespace prefix video on content_loc is not defined
error on line 61 at column 19: Namespace prefix video on video is not defined
error on line 62 at column 22: Namespace prefix video on title is not defined
error on line 63 at column 28: Namespace prefix video on content_loc is not defined
error on line 65 at column 19: Namespace prefix video on video is not defined
error on line 66 at column 22: Namespace prefix video on title is not defined
error on line 67 at column 28: Namespace prefix video on content_loc is not defined
error on line 81 at column 19: Namespace prefix video on video is not defined
error on line 82 at column 22: Namespace prefix video on title is not defined
error on line 83 at column 28: Namespace prefix video on content_loc is not defined
error on line 85 at column 19: Namespace prefix video on video is not defined
error on line 86 at column 22: Namespace prefix video on title is not defined
error on line 87 at column 28: Namespace prefix video on content_loc is not defined
有办法解决这些问题吗?我是不是在urlset
的配置上遗漏了什么?提前谢谢你。
发布于 2022-11-02 19:01:53
他们是谷歌吗?
但是它们告诉我们可以读取它,但是存在带有命名空间和命名空间前缀的错误。
嗯,缺少的名称空间似乎是xmlns:视频,我没有看到它在Google的“如何使用”中一直使用,但是它列在Google的最佳实践中.相关丰富的搜索结果,让谷歌有一个片段的视频,以改善您的清单。
https://developers.google.com/search/docs/appearance/video#videoobject
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
xmlns:video="http://www.google.com/schemas/sitemap-video/1.1">
https://webmasters.stackexchange.com/questions/140804
复制相似问题