【问题标题】:Why am I getting this error “one or more unbound namespace prefixes” for Sitemap.xml为什么我会收到 Sitemap.xml 的“一个或多个未绑定的命名空间前缀”错误
【发布时间】:2015-05-15 18:07:47
【问题描述】:

我已将我的 sitemap.xml 提交到谷歌网站管理员工具中。我们发现诸如“无法解析 XML 站点地图,因为它包含一个或多个未绑定的命名空间前缀。例如,在没有事先 xmlns:xhtml="http://www.w3. org/1999/xhtml"。"

我的站点地图网址:http://www.cadservicesindia.com/sitemap.xml

【问题讨论】:

    标签: xhtml sitemap google-search-console xml-sitemap bing-webmaster-tools


    【解决方案1】:

    您的 XML 文件中的第一行似乎格式错误。似乎把网址粘贴了两次,可能是错误的:

    <urlset xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9             http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd">
    

    试试这一行:

    <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"> 
    

    【讨论】:

    • 我根据阅读这篇文章稍微编辑了答案:support.google.com/webmasters/answer/183668?hl=en
    • cadservicesindia.com 上的站点地图尚未更正,这就是它不起作用的原因。
    • 六年后我遇到了同样的问题,URL 被粘贴了两次,直到我读到你的答案才注意到,我不得不将属性更改为xmlns。非常感谢!
    【解决方案2】:

    有同样的问题。 尝试在顶部添加此内容

    <?xml version="1.0" encoding="UTF-8"?>
    <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
    

    【讨论】:

      猜你喜欢
      • 2013-11-22
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-08-20
      相关资源
      最近更新 更多